My-iGroup Posted December 9, 2007 Share Posted December 9, 2007 Having recently upgraded to Apache 2 with suPHP, I find that the Cron Job ( php -q /home2/xxxxxxx/public_html/xxxxxxxx/admin/cron.php ) for the Automation Settings no longer runs? Running admin/cron.php through the browser fires it of no problem! I suspect it is suPHP............. any fix? 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted December 9, 2007 Share Posted December 9, 2007 Hey, What is the error you are getting? (look in your logs) Have you tried running that command from SSH and see if it gives you error? Or, instead of using php -q, you can use wget or lynx or GET to run the page. lynx -dump http://... GET http://... From, Adam 0 Quote Link to comment Share on other sites More sharing options...
arteryplanet Posted December 9, 2007 Share Posted December 9, 2007 Did you check the apache logs and/or cron logs? Make sure the script is owned by your account username and have chmod 755. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted December 9, 2007 Share Posted December 9, 2007 im running suphp and apache2 and my crons run fine. 0 Quote Link to comment Share on other sites More sharing options...
arteryplanet Posted December 10, 2007 Share Posted December 10, 2007 did you check the apache logs? 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 10, 2007 Author Share Posted December 10, 2007 Hi Guys, Thanks for your input................. Here's what I get [root /root]# php -q /home2/xxxxxxx/public_html/xxxxxxx/admin/cron.php Status: 404 Not Found X-Powered-By: PHP/5.2.5 Content-type: text/html No input file specified. [root /root]# Believe me, it's there and function is completed when accessed by browser. Perms are 644 (have also tried 755), Comments Please! 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted December 10, 2007 Share Posted December 10, 2007 look what permission you have on /usr/bin/crontab 0 Quote Link to comment Share on other sites More sharing options...
arhost Posted December 10, 2007 Share Posted December 10, 2007 Try: chmod 4755 /usr/bin/crontab 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 10, 2007 Author Share Posted December 10, 2007 /usr/bin/crontab is set to 755 0 Quote Link to comment Share on other sites More sharing options...
arteryplanet Posted December 10, 2007 Share Posted December 10, 2007 Are you sure thats the correct path to the file /home2/xxxxxxx/public_html/xxxxxxx/admin/cron.php? 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted December 10, 2007 Share Posted December 10, 2007 /usr/bin/crontab is set to 755 it should be 4755 as arhost said 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 10, 2007 Author Share Posted December 10, 2007 Apart from the xxxxxxx's yes, it's correct. It works perfect if accessed via the URL in the browser. It has me stumped! 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 10, 2007 Author Share Posted December 10, 2007 Sorry yes, it's 4755 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted December 10, 2007 Share Posted December 10, 2007 ok last try chmod to 6755 and try it . 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 10, 2007 Author Share Posted December 10, 2007 Thanks, trying that now! 0 Quote Link to comment Share on other sites More sharing options...
My-iGroup Posted December 11, 2007 Author Share Posted December 11, 2007 Nope, still not working! Thanks anyway............. 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted December 11, 2007 Share Posted December 11, 2007 Hey, Crontab does not having anything to do with the command PHP, so that is totally wrong. Make sure that you file path is correct as that is what the error is stating. Also make sure that the user is running that script and not root. You can also use GET http://domain.com/admin/cron.php From, Adam 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted December 11, 2007 Share Posted December 11, 2007 Crontab does not having anything to do with the command PHP, so that is totally wrong. You have absolutely No idea what you are talking about , if the permission is wrong then the command will not run . and don't try to be smart and make always stupid comments. 0 Quote Link to comment Share on other sites More sharing options...
lostinspace Posted December 11, 2007 Share Posted December 11, 2007 and don't try to be smart and make always stupid comments. You do realize how funny that statement is right? 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted December 12, 2007 Share Posted December 12, 2007 You have absolutely No idea what you are talking about , if the permission is wrong then the command will not run . and don't try to be smart and make always stupid comments. Hey, He ran the command with out crontab and its giving an error, its most likely not an error with crontab, but the command he is running! If it was an error with crontab, than he would have other problems as well, like cpanel not updating, cpanel not performing backups etc. If you read the replies he tried to run the command he used in crontab as a regular command in the cli and it gave an error as WELL! From, Adam 0 Quote Link to comment Share on other sites More sharing options...
cdixon Posted January 1, 2008 Share Posted January 1, 2008 I get this same error for my cron. My cron has not been running for a few weeks now. However, it does work if I go to admin/cron.php in my browser but how can I get the cron to start working automatically again? I get a message saying Site error: the file /home/dsol/public_html/support/admin/cron.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator. I have updated ioncube and my php.ini files and still no luck. On my error logs I get the following: [Tue Jan 01 14:05:02 2008] [error] [client -] SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable [Tue Jan 01 14:05:02 2008] [error] [client -] Premature end of script headers: 5min.php [Tue Jan 01 14:05:04 2008] [error] [client -] Failed loading /usr/local/Zend/lib/ZendOptimizer.so: /usr/local/Zend/lib/ZendOptimizer.so: cannot open shared object file: No such file or directory, referer: http://www.neosmut.com/vb/general-di...guns-guns.html [Tue Jan 01 14:06:01 2008] [error] [client -] SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable [Tue Jan 01 14:06:01 2008] [error] [client -] Premature end of script headers: 1min.php [Tue Jan 01 14:06:01 2008] [error] [client -] SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable [Tue Jan 01 14:06:01 2008] [error] [client -] Premature end of script headers: 1hr.php [Tue Jan 01 14:06:01 2008] [error] [client -] SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable [Tue Jan 01 14:06:01 2008] [error] [client -] Premature end of script headers: cron_minute.php 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted January 5, 2008 Share Posted January 5, 2008 Hey, You do not have ionCube installed on your site/server. Get that working and that should fix the error. As for the other errors, recompile PHP and make sure Zend is installed correctly (try reinstalling). From, Adam 0 Quote Link to comment Share on other sites More sharing options...
ChuckB Posted January 5, 2008 Share Posted January 5, 2008 Odd question - as I have seen some of the "cpp" bits in other setups, but are you running Suhosin as well as SuPHP? I have noted that mine while it runs, it cuts off, I have to run it several times from the browser to complete all of it, and while I am getting no suPHP or mod_security errors, my only other possibility is Suhosin. Doing some research later, but let me know if your running it as well. 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted January 6, 2008 Share Posted January 6, 2008 Here's what I get [root /root]# php -q /home2/xxxxxxx/public_html/xxxxxxx/admin/cron.php Status: 404 Not Found X-Powered-By: PHP/5.2.5 Content-type: text/html No input file specified. [root /root]# Believe me, it's there and function is completed when accessed by browser. My bet is that you have the line in the root crontab rather than the crontab for the account under which WHMCS is installed. This would explain why it stopped working after you installed suphp. Remember, suphp is checking that the uid running the file (root) is the same as the uid owning the file (the account under which WHMCS is installed). In this case the account is almost certainly not root, hence your problems! Perms are 644 (have also tried 755)Wouldn't make any difference, execute permission is only needed when the file is run directly, ie ./cron.php. 0 Quote Link to comment Share on other sites More sharing options...
lucky Posted June 14, 2008 Share Posted June 14, 2008 if you run php 4 by default, try this /usr/bin/php4 -q /home2/xxxxxxx/public_html/xxxxxxx/admin/cron.php 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.