Tuesday 31 July 2007 8:29:23 am - 5 replies
Hi.
I have a problem with the integrated cronjobs. There are some objects in my system which have to be unpublished after 4 weeks.
When I connect to the server using ssh and start the runcronjobs.php
# php runcronjobs.php
everything works fine.
But if I start this by a server-cronjob, I get an error message via email.
The cronjob opens a file located on the webserver. Content of the file:
#/bin/bash cd /srv/www/vhosts/<domainname>/httpdocs/cms/; php runcronjobs.php
I get this error message:
Fatal error: eZ publish did not finish its request The execution of eZ publish was abruptly ended, the debug output is present below.
I'm using eZ 3.9.0.
Thanks for your help,
Philip
Modified on Tuesday 31 July 2007 8:30:32 am by Philip K.
Monday 06 August 2007 3:33:21 pm
Hi.
Thanks for your reply.
Is tested it with
# php runcronjobs.php -dall
And got this result by email:
Fatal error: eZ publish did not finish its request The execution of eZ publish was abruptly ended, the debug output is present below. No timing points defined Group ini_load: Load cache: 0.0540 sec (40.1041%), 0.0270 avg sec (2) FindInputFiles: 0.0055 sec (4.0696%), 0.0027 avg sec (2) Parse: 0.0359 sec (26.6808%), 0.0359 avg sec (1) Save Cache: 0.0029 sec (2.1455%), 0.0029 avg sec (1) Total script time: 0.1346 sec
What does it say? I don't understand...
I also tried it with
# php -v runcronjobs.php -dall
and got:
PHP 4.4.0 (cli) (built: Jun 20 2006 10:29:29) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
But the object is still there and isn't unpublished...
Thanks for your help,
Philip
Modified on Monday 06 August 2007 3:34:41 pm by Philip K.
Monday 06 August 2007 4:07:57 pm
If I was troubleshooting this problem I would consider acting on the following
1) Install and enable Xdebug, <i>http://xdebug.org/install.php</i>
2) Share your list of enabled cronjobs (from, 'settings/cronjob.ini', '[CronjobSettings]' and 'Scripts[]') here in the forum thread
3) Try again (with xdebug enabled) and share the xdebug output here in the forum thread.
It is my idea that xdebug will show you a wealth of greater debug / error output which will help point out the specific problem you are encountering.
<i>http://ezpedia.org/wiki/en/ez/debugging
http://ezpedia.org/wiki/en/ez/xdebug</i>
<i>//kracker
Bizarre - Hannicap Circus - Doctor Doctor ....</i>
Modified on Monday 06 August 2007 4:11:12 pm by kracker
Monday 06 August 2007 6:55:24 pm
Hi,
That's likely that some php extensions are only installed for the php modules and not the php cli one, or that the path is incorrect and from the shell you use php cli and from the cronjob a php-cgi (or php5 or...) .
run php-v from the cron and see if you have the same than from the shell.
do the same with php -i (see if you have the mysql module installed)
X+
Tuesday 07 August 2007 3:06:31 am
Hi Philip
In addition to the other advice in the thread you should use full paths in these types of jobs. It not a good idea to reply on the environment to work these things out.
When you are logged in find out the full path of the php cli using whereis and modify your script to use this. e.g.
# whereis php php: /usr/bin/php /etc/php.ini /etc/php.d /usr/share/man/man1/php.1.gz
So where you'd replace "php runcronjobs.php" with "/usr/bin/php runcronjobs.php"
Once you have modified the script check that you can run the script when logged in (as opposed to running the script directly via the command line)
Is the script being run by the same user when you are logged in as it is when you are running it via cron. Do they have the same permissions, are they able to read(and write to) all same the files.
You might want specifically define the siteaccess you want the job to run under. e.g.
/usr/bin/php runcronjobs.php -s plain_admin
(This doesn't appear to be an issue as you can run it on the command line - but good to be specific)
HTH
Cheers
Bruce
You must be logged in to post messages in this topic!