Support

Admin Tools

#16702 Filescanner doesnt work as CRON job

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 08 July 2013 07:39 CDT

12ernie
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? yes
Have I searched the tickets before posting? yes
Have I read the documentation before posting (which pages?)? yes
Joomla! version: 2.5.11
PHP version: 5.4.16
MySQL version: 5.1
Host: provider: 1and1
Admin Tools version: professional 2.5.6

Description of my issue:
Filescanner works fine online, but I dont get it to work via cron resp. commandline (Akeeba Backup works fine in the same installation also in cron/commandline-mode!!).

It just comes up that way -finished within a second:
(uiserver):xxx:~ > /usr/bin/php6 /homepages/xx/xxxxx/htdocs/xxx/cli/admintools-filescanner.php
X-Powered-By: PHP/5.4.16
Content-type: text/html

(uiserver):xxx:~ >

I installed the idententical file "admintools-filescanner.php" on another server in another -but similar- environment, it works!

nicholas
Akeeba Staff
Manager
The PHP binary you are using in your command line (/usr/bin/php6) is PHP CGI, not PHP CLI. CGI = Common Gateway Interface, used to serve web pages. CLI = Command Line Interface, used to run command line scripts (like the CRON scripts). Normally Joomla!'s JApplicationCli, the core API used in all of our CRON jobs, requires PHP CLI and won't work on PHP CGI. For Akeeba Backup's CRON script (and only for those two scripts!) I have gone into great lengths adding PHP CGI support. The downside is that it is a very complicated process and the code needs to be reviewed with each new version of Joomla!. It is also possible that at some point it will break and I'll have to remove it.

So, the real solution is for you to ask your host to give you the PHP CLI path and use it in your CRON job's command line.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!