Skip to content

Command lines on install directory

akhilleusuggo edited this page Mar 24, 2021 · 5 revisions

First of all, make sure to deny access to the /install directory after you have installed successfully installed AVideo Platform. You can create .htaccess to deny all requests ( since you can't do much from a browser, but it's a vulnerability ). You can di it by simply creating the .htaccess ( nano .htaccess ) and pasting this .

order deny, allow

deny from all

allow from 127.0.0.1

In case you're not going to be using the command lines, then yes you should follow the instruction and delete this directory . rm -r install/

1- What are the files inside the install/ directory are used for ?

They're used to execute command lines for bulk installs, updates, deletes, corrections, restore, and removals. It's a way to connect and communicate your site configuration with the database .

2- How to use it? What files are in there?

To use it, you need to type: php file_name.php ; example: php deleteThumbsFiles.php

As the project goes forward, new files are created. This are the files there are today:

image

3- Explanation :

The file names themselves are self-explained. But let's walk through them.

  • checkConfiguration.php: Used at the installation process ( don't use it, unless you know what you're doing, mostly trying to re-create the config file under /videos directory .
  • deleteThumbsFiles.php: Used to delete all thumb files ( NOT THE ORIGINAL ONCES ), only the resized once and the Thumbnails to display when the user is hovering over the progress bar or dragging it to seek, by the plugin [VideoThumbnails]
  • installPluginsTables.php: Used at the installation process ( don't use it, unless you know what you're doing, mostly trying to re-create the database )
  • removeRepeatedPlaylists.php: Does a check on the created playlist on the database, in case of repeated one, will be removed to make your site lighter .
  • database.sql: The database installed at the installation process ( don't execute it unless you know what you're doing )
  • getAllWebp.php: _Will check if all your videos do have a gif-webp. In case you have 10k videos hosted, this process may take a while. I recommend using crontab for weekly checks. In case a video for some reason doesn't have a gif-webp, will be automatically generated. _
  • liveLinks.php: Executing this command will list all the live links of all your users ( not only the ones online but also offline ) .
  • removeViewsStatisticsErrors.php: Will remove some errors on the views stats based on sessions_ids
  • deleteOrphanFiles.php: Will ensure to not have files ( videos/images ) that are not linked to any video hosted on the database. In case you deleted a video, and for some permissions issues files could be there taking space. This command will check in case that happens .
  • index.php: This is the installer file itself, the one we use to make the first installation. you must run this file from the browser, and it will only work if the videos/configuration.php is NOT present
  • makeAdmin.php: In case you wanna nominate a user as admin, you can do it from the site ( logged as admin ), or with this command line. You will be prompted to type the username of the one nominated to be admin. Use it only in case for some reason you need a second user admin or you got some issue with your main user admin.
  • updateDiskUsage.php: Does bulk disk usage update. I recommend using crontab for a daily/weekly disk usage update if you wanna skip having to do it manually or from the admin section. Crontab will serve as automizer .
  • deleteStorageFiles.php: This file is useful only for the ones who have the YPTStorage plugin. In case something happens during the transfer to the storage and some of your files or directories are not deleted, this will help you to find and delete the files that are already on the storage and there is no more need locally
  • install.php: Used at the installation process to create the config file .
  • recoverPassword.php: Used to recover the password of any user .
  • updateStreamerURL.php: In case you have changed your domain name, you can execute this command line instead of having to change it manually from the config file under /videos directory .
  • resetPlugins.php: Useful to reset access to your site in case you miss configured your plugins and locked yourself out . Example : turning off login portal . Known Related issues: https://github.com/WWBN/AVideo-Encoder/issues/360 , https://github.com/WWBN/AVideo/issues/3755
Clone this wiki locally