Re: [PHP] PHP as a cron job
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open what's the first line of the file being called by cron? is it #!/usr/local/bin/php -q Exactly! Tiago -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
This is exactly what the documentation says. I have tried this (and also others) configuration. In any scenario the error message is the same. I am not clear on what you are trying do. However, let me tell you how we are running PHP scripts as cron jobs. We have setup cron to execute a shell script. The shell script invokes {path-to-php-binary}/php -q my_script.php That works fine. Hope that helps. --- mike cullerton [EMAIL PROTECTED] wrote: on 1/16/02 11:26 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open what's the first line of the file being called by cron? is it #!/usr/local/bin/php -q -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = Anas Mughal [EMAIL PROTECTED] [EMAIL PROTECTED] Tel: 973-249-6665 __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP as a cron job
I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740
Re: [PHP] PHP as a cron job
Please provide more information on how you have set up PHP to run your cron jobs. Are you trying to execute via LYNX or directly via a PHP script? /dkm - Original Message - From: Tiago Luchini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 8:20 AM Subject: [PHP] PHP as a cron job I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
I am trying to run directly via PHP. I have tried setting 755 to the script and adding #!/usr/bin/php -q to it and also tried to change my cron line to run /usr/bin/php sending the script as a parameter. Both options run normally when logged on a TTY. Tiago - Original Message - From: Dennis Moore [EMAIL PROTECTED] To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 12:18 PM Subject: Re: [PHP] PHP as a cron job Please provide more information on how you have set up PHP to run your cron jobs. Are you trying to execute via LYNX or directly via a PHP script? /dkm - Original Message - From: Tiago Luchini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 8:20 AM Subject: [PHP] PHP as a cron job I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? mike on 1/16/02 10:07 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: I am trying to run directly via PHP. I have tried setting 755 to the script and adding #!/usr/bin/php -q to it and also tried to change my cron line to run /usr/bin/php sending the script as a parameter. Both options run normally when logged on a TTY. Tiago - Original Message - From: Dennis Moore [EMAIL PROTECTED] To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 12:18 PM Subject: Re: [PHP] PHP as a cron job Please provide more information on how you have set up PHP to run your cron jobs. Are you trying to execute via LYNX or directly via a PHP script? /dkm - Original Message - From: Tiago Luchini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 8:20 AM Subject: [PHP] PHP as a cron job I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740 -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
Hi, I have to sweat my way through /usr/bin/php if that does not work try /usr/local/bin/php or ask the Unix Sysadmin. one problem I still have to overcome is that everything works,( I mean DB Connection etc.) but I can not use mail() function. Any body have any ideas why I can't use mail()? --- mike cullerton [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? mike on 1/16/02 10:07 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: I am trying to run directly via PHP. I have tried setting 755 to the script and adding #!/usr/bin/php -q to it and also tried to change my cron line to run /usr/bin/php sending the script as a parameter. Both options run normally when logged on a TTY. Tiago - Original Message - From: Dennis Moore [EMAIL PROTECTED] To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 12:18 PM Subject: Re: [PHP] PHP as a cron job Please provide more information on how you have set up PHP to run your cron jobs. Are you trying to execute via LYNX or directly via a PHP script? /dkm - Original Message - From: Tiago Luchini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 8:20 AM Subject: [PHP] PHP as a cron job I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740 -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
I have to sweat my way through /usr/bin/php if that does not work try /usr/local/bin/php or ask the Unix Sysadmin. both paths work under a TTY but not when I send my script to cron. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
on 1/16/02 11:26 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open what's the first line of the file being called by cron? is it #!/usr/local/bin/php -q -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
I am not clear on what you are trying do. However, let me tell you how we are running PHP scripts as cron jobs. We have setup cron to execute a shell script. The shell script invokes {path-to-php-binary}/php -q my_script.php That works fine. Hope that helps. --- mike cullerton [EMAIL PROTECTED] wrote: on 1/16/02 11:26 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open what's the first line of the file being called by cron? is it #!/usr/local/bin/php -q -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = Anas Mughal [EMAIL PROTECTED] [EMAIL PROTECTED] Tel: 973-249-6665 __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as a cron job
I know this is a total hack job but could you say, set the location of the script as your default page in a browser, then open the browser via cron and it would run it as the page opens? I am interested in this too, I am VERY new to Linux and have only just started to look at cron, any links to SIMPLE tutorials or something similar would be appreciated. [EMAIL PROTECTED] wrote: on 1/16/02 11:26 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? Yes. Same thing happens with absolute or relative paths. what's the line in your code where this error occurs? it doesn't run any line at all. don't matter what I put on my code, it just says unable to open what's the first line of the file being called by cron? is it #!/usr/local/bin/php -q -- mike cullerton michaelc at cullerton dot com