Softaculous


Topic : Cron message


1

Posted By: Marie on June 2, 2009, 1:21 pm
Bug ?

Just so you know, the cron job is returning this message :



Quote
/bin/sh: 1


: ambiguous redirect





-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: alons on June 2, 2009, 5:38 pm | Post: 1
Are you running 1.3 ?
Also where does it show this message ?

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Marie on June 2, 2009, 6:27 pm | Post: 2
Yes, I'm running 1.3 and I'm getting the message as a report email after cron run.


-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: Tyler on June 5, 2009, 7:12 pm | Post: 3
I'm also having this problem.  1.3, and it emails me after the cron is run.

/bin/sh: 1

: ambiguous redirect

Posted By: alons on June 6, 2009, 3:29 am | Post: 4
Did it update to 1.4 and are the packages update or not ?

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Tyler on June 6, 2009, 4:09 am | Post: 5
Nope, it didn't update as I had to do that myself.  It also isn't updating. Packages as I had to also update those myself.

Posted By: Marie on June 6, 2009, 3:56 pm | Post: 6
The problem is that /etc/cron.d/softaculous is in DOS format (reported by "nano") and it most likely contains some hidden characters :
Quote

Jun  6 17:14:01 facpanel crond[22132]: (root) CMD (/usr/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php >> /dev/null 2>&1^M)


Quick fix :

Code
echo '1 8 * * * root /usr/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php >> /dev/null 2>&1' > /etc/cron.d/softaculous


And it's working :
Quote
Jun  6 17:37:01 facpanel crond[24099]: (root) CMD (/usr/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php >> /dev/null 2>&1)



-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: alons on June 8, 2009, 2:48 pm | Post: 7
But there are no hidden characters and how is it in DOS format ?
There seems to be a problem of SHELL.
Can you please try :
Code

SHELL=/bin/sh
1 8 * * * root /usr/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php >> /dev/null 2>&1



Dont forget the extra Line Break at the end!

Edited by alons : June 8, 2009, 2:50 pm

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Marie on June 8, 2009, 3:01 pm | Post: 8
I had tried to declare the shell, already - no joy.

This is what nano is reporting :

Quote
[ Read 1 line (Converted from DOS format) ]



This does fix the issue :
Code
echo '1 8 * * * root /usr/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php >> /dev/null 2>&1' > /etc/cron.d/softaculous


Edited by Marie : June 8, 2009, 3:02 pm

-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: alons on June 8, 2009, 3:07 pm | Post: 9
But the fix you provide is the same that is already there!

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Marie on June 8, 2009, 3:16 pm | Post: 10
Yes, the command is the same, but it gets rid of the DOS format, as the command is written by a linux system  :)

I assume you are developing your program under Windows ? I had the same problem before switching my own machine to Fedora.

-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: alons on June 8, 2009, 3:21 pm | Post: 11
I think this could be a problem.
We used a lin break in the real sense! :

PHP Code

 $data $time.' root /usr/bin/php '.$globals['path'].'/cron.php >> /dev/null 2>&1
'




Observe the Line break we provide

Edited by alons : June 8, 2009, 3:21 pm

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Marie on June 8, 2009, 3:27 pm | Post: 12
I am not a PHP programmer, but the line break is most likely the problem here  :-)




-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Posted By: alons on June 8, 2009, 3:28 pm | Post: 13
Ok found the error!
Its a \r carriage return.
In the above code its \r\n causing the error.

Linux wants only \n !
Hence the error

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: Marie on June 8, 2009, 3:31 pm | Post: 14
Good catch !
And thank you so much  :D


-----------------------
Marie - Co-Owner
Need Further Assistance ? Here you go !
English, french and spanish support  :angel:

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.