This forum is no longer active. Please post your questions to our new community site

Forums SugarCRM

cron error: grandchild #3133 failed with exit status 127

Subscribe to cron error: grandchild #3133 failed with exit status 127 3 post(s), 2 voice(s)

 
Avatar faisalsadaf 4 post(s)

In SugarCRM, I have created a campaign, scheduled emails to be sent. Went to system shell, edited sudo cron to add the following command provided by SugarCRM:

  • * * * * cd /home/myhomedir/lampstack-1.2-3/apps/sugarcrm/htdocs; php -f cron.php > /dev/null 2>&1

However, when i monitor syslog, i get the following error message:

(CRON) error (grandchild #3133 failed with exit status 127)

So I open a shell prompt, go to the sugarcrm/htdocs directory, and type:

which php

System says php not installed, and prompts me to install php. Well, I know that php is installed as part of LAMPstack, so what gives?

Does anyone have this issue? I just want my cron job to execute.

Thanks
Faisal

System details:
- Ubuntu 10.10 64bit VMWare VM
- 1GB RAM, 100GB drive space
- LAMPstack with SugarCRM, updated 6.1.2
- Alfresco installed as well

 
Avatar faisalsadaf 4 post(s)

So, after a couple of hours of trying to figure this out (I’m a newbie), I found a forum thread that talks about invoking the cron.php from inside lampstack shell. Here’s the commands that I typed:

cd /home/myhomedir/lampstack-1.2-3/
./use_lampstack
php -f /apps/sugarcrm/htdocs/cron.php

With the above three commands, I was able to test the script manually.

I am still challenged on how to add this to cron. Within the lampstack shell, I did this:

- crontab -e
- added a line as follows:
- * * * * * cd /home/mfansari/lampstack-1.2-3/; ./use_lampstack; php -f /apps/sugarcrm/htdocs/cron.php > /dev/null 2>&1

Kept monitoring the syslog, and now getting this error:

(CRON) error (grandchild #3577 failed with exit status 127)

Apparently cron is not able to locate the script. Not sure if its not able to find ./use_lampstack or php itself.

Any ideas?

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

It is only necessary to specify the full path to the files. Try the following:

  • * * * * cd /home/mfansari/lampstack-1.2-3/; /home/mfansari/lampstack-1.2-3/php/bin/php -f /home/mfansari/lampstack-1.2-3/apps/sugarcrm/htdocs/cron.php > /dev/null 2>&1

Check that the user who are going to run the script is “mfansari”, the same user who installs the stack. I hope it helps.

Forums SugarCRM