cancel
Showing results for 
Search instead for 
Did you mean: 

Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Hello everyone,

 

After upgrade to 1.9.2.2, I get this error everytime cron is scheduled

.../cron.sh: line 46: ps: command not found 

 

I contacted siteground and the answer was that ps is not available for shared hosting but only for dedicated servers.

 

Since I am not willing to go to dedicated server just to have access to the command PS, please help me to find another solution

 

I would label this issue as critical, due to the fact that my online shops are not sending mail anymore, due to this little thing called ps.

 

Tags (2)
19 REPLIES

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Are you trying to call for the cron with wget? 1.9.2.2 doesn't support that anymore I believe. I had to change my cron job yesterday (SG actually helped me with it, I'm on a virtual server). 

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

as I said in the title, the error is that ps is not found, and is also not available in the shared hosting package.

no, I am not using wget and never used it - always started cron by command line - before with php, now with sh

 

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Could you post what your cronjob looks like exactly?

Did I help you solve your problem? Click Accept as Solution!
DudeSquare Web Development

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Hello

 

This is the command line used in cron section of cpanel:

*/5 * * * * /bin/sh /[magento_path]/cron.sh

 

The problem, I repeat, is that on shared servers, SiteGround does NOT offer access to PS binary. Hence the error: 

cron.sh: line 46: ps: command not found

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

I guess all that's left is calling the php script directly in your cron. The cron.sh script checks if a cron job is still running before starting a new one, for which the ps command is needed. Your new cronjob would look something like this:

 

*/5 * * * * /usr/bin/php /[magento_path]/cron.php

 Note, however, that with this cronjob it's possible that multiple jobs will be running at the same time, causing them to queue up and potentially slow down your server.

Did I help you solve your problem? Click Accept as Solution!
DudeSquare Web Development

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Once again and I hope it's the last time: both cron.sh and cron.php are calling the binary PS since 1.9.2.2

The PS binary is NOT available on siteground's share hosting servers therefore cron is not working (neither cron.php nor cron.sh)

The problem is that I know exactly how to call cron scripts since I had configured myself all those scripts and until 1.9.2.1 (including) everything worked just fine. 

 

As far as the cron.php script concerns, let me quote xtento.com - http://support.xtento.com/wiki/Setting_up_the_Magento_cronjob

Setting up the Magento cronjob

Please set up the Magento as recommended by Magento using cron.sh and make sure cron.sh is called every 5 minutes.

It is VERY important your PHP configuration is the same for php-binary-based executions. If it's not the same php.ini file/configuration as for webserver/Apache executions, some things may not work.

Setting up the Magento cronjob [Old method, recommended until Oct 2015]

This method is not recommended anymore as with Magento 1.9.2.2 cron.php cannot be called via HTTP anymore. Use cron.sh and not wget/cron.php.

 

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

What I am looking for is a workaround for that missing ps script that is called by cron.sh and cron.php in order to have a working magento shop.

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Perhaps editing cron.php and telling it shell is disabled by adding

 

$isShellDisabled = true;

at line 50.

Did I help you solve your problem? Click Accept as Solution!
DudeSquare Web Development

Re: Siteground hosting - after upgrade to 1.9.2.2 cron.sh: line 46: ps: command not found

Tried that too, but it seems that my Magento 1.9.2.2 cannot write registration and reset password e-mails on the database (tables core_email_queue and core_email_queue_recipients).

Only orders placed by existing users appears on those tables.