Jump to content

Cron & suPHP


My-iGroup

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated