Re: Cron running 'Hello world' script dies with "Could not startup."

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 08 Aug 2006 17:07:29 +0200, Ivo F.A.C. Fokkema wrote:

> On Tue, 08 Aug 2006 10:01:41 -0500, Ray Hauge wrote:
> 
>> On Tuesday 08 August 2006 09:01, Ivo F.A.C. Fokkema wrote:
>>> On Tue, 08 Aug 2006 09:01:42 -0500, Ray Hauge wrote:
>>> > On Tuesday 08 August 2006 08:47, Ivo F.A.C. Fokkema wrote:
>>> >> > Does the user running the cron have permission to execute the php
>>> >> > binary?
>>> >>
>>> >> Yes, the file's owner is me and it's my crontab. Also, I've made the
>>> >> file readable to all, just in case. All directories up the directory
>>> >> tree are readable/executable, as well.
>>> >
>>> > I think he's asking if the php program is executable to you, the user. 
>>> > It is possible that it would only have execute for owner and group, not
>>> > other.
>>>
>>> Sorry, yes, The PHP binary is executable by all. Actually, I'm very sure
>>> the error message "Could not startup." is generated by PHP-cli. When
>>> googling on that exact message, I found it in the PHP-cli source code
>>> (including the period at the end). However, I cannot determine from the
>>> PHP-cli source code what's up.
>> 
>> It looks like when you run the script, then it works just fine, but it blows 
>> up when you run it through cron.
>> 
>> Two things I would check:
>> 
>> 1) Cron can read your *.php files.
>> 
>> 2) Cron can run php
>> 
>> to test #2, have cron do a php -i and see what happens.
> 
> 1) was OK, but 2) didn't return anything, not even an error... this has
> started me thinking, and when using -ni it works...! -n makes PHP-cli
> ignore the .ini file. When looking at my .ini file, the modification date
> is July 31st, the day it all stopped working. I need to leave now, but
> will investigate tomorrow to see what's up with my .ini files, on both
> machines, and check if my scripts run with -n or after tweaking of the
> .ini.
> 
> Thanks!

OK guys... guess what? It was the php.ini file from PHP-cli. I had been
messing around with PHP-GTK and had edited PHP-cli's php.ini to load the
gtk.so library (on both machines). Apparently, this stops PHP-cli to
function completely from cron. Even the 'Hello world' script didn't run.
The suggestion to try php -i got me thinking. Since that
didn't return anything, I thought about trying php -h (worked) and php -ni
(ignore .ini file). Suddenly, it worked...

SO: Loading the GTK library in your /etc/php4/cli/php.ini, KILLS the
PHP-cli functionality from cron. On Ubuntu Dapper, that is. Not sure about
other distros.

Thanks guys, for all of your suggestions!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux