Tip | |
---|---|
Consult the PHP File Change Scanner Scheduling page for detailed information, tailored to your site, without having to read this documentation page. |
Important | |
---|---|
In past versions of Admin Tools we shipped our own CLI script to let you schedule the scans with a CRON job. Since Admin Tools 7 we are using Joomla's CLI application. If you had schedules scans in the past you will need to edit your CRON jobs. That's one thing we cannot do automatically for you when you update since CRON jobs are handled by your host, not Joomla itself. |
Admin Tools adds a command to the Joomla CLI application which allows you to run the PHP File Change Scanner through a CRON job or directly from the command line. For this to work you must publish the plugin Console – Admin Tools. This plugin is automatically installed and published for you when you install or update Admin Tools. Please keep in mind that if you disable this plugin the command line scans will fail with an error.
To schedule a file scan, you will have to use the following command line to your host's CRON interface:
/usr/local/bin/php
/home/USER/webroot
/cli/joomla.php admintools:scan
where /usr/local/bin/php
is the path
to your PHP CLI executable and
/home/USER/webroot
is the absolute path to
your web site's root. You can get this information from your
host.
Special considerations:
Most hosts do not impose a time limit on scripts running from the command-line. If your host does and the limit is less than the required time to scan your site, the scan will fail.
Joomla's cli/joomla.php
script is not
meant to run from a web interface. If your host only provides
access to the CGI or FastCGI PHP binaries, this script will not
work with them. The solution to this issue is tied to the time
constraint above.
Admin Tools merely adds a command to Joomla's CLI application. The execution interface is handled by Joomla. If you do not see the message “Beginning a site scan with the PHP File Change Scanner” when trying to run a scan through Joomla's CLI application the problem lies in Joomla's code, not our code, meaning that we are unlikely to be able to help you.
Please bear in mind that Joomla's CLI application will load and run system plugins installed on your site. If you have third party system plugins which wrongly assume that they are always running under Joomla's frontend or backend application (i.e. a web server application) and fail when loaded through the CLI application then your file scans will fail. If this happens you will need to take the issue with the third party extensions which shipped the offending system plugin(s). We cannot modify third party software.
Some servers do not fully support this scan method. The usual symptoms will be a scan which starts but is intermittently or consistently aborted in mid-process without any further error messages and no indication of something going wrong. In such a case, trying running the scan from the back-end of your site will work properly. If you witness similar symptoms, you can most likely not automate your site's scan.