Problem with Crontab

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
pas
Forum Newbie
Posts: 2
Joined: Tue Jan 22, 2008 6:56 am
Location: Bavaria, Germany
Contact:

Problem with Crontab

Post by pas »

Hello,
I have upgraded PHP 4.4.7 to PHP 5.2.4 by compiling.
After this upgrade I have now this problem: I can't include or require other php-files in scripts executed by the crontab.
My Crontab in Confixx:

Code: Select all

* * * * * php ~/html/php/ccb/cron.php > /dev/null
Now I always get the error (by mail):

Code: Select all

PHP Warning:  include(../system.php): failed to open stream: No such file or directory in /home/www/web1/html/php/ccb/cron.php on line 2
PHP Warning:  include(): Failed opening '../system.php' for inclusion (include_path='.:/usr/lib/php') in /home/www/web1/html/php/ccb/cron.php on line 2
 
But the file system.php exists here: /home/www/web56/html/php/system.php and the script works well by executing in browser (http://....).
The include_path /usr/lib/php is for the PEAR-Libary.
Any solution?

My System:
openSuse 10.1
Apache 2.2.0
Administration: SWSoft Confixx 3.3 Pro.
Thanks!
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Problem with Crontab

Post by VladSun »

Use absolute paths instead of relative.
There are 10 types of people in this world, those who understand binary and those who don't
pas
Forum Newbie
Posts: 2
Joined: Tue Jan 22, 2008 6:56 am
Location: Bavaria, Germany
Contact:

Re: Problem with Crontab

Post by pas »

But have I something in the PHP.ini false?
It worked in PHP 4.4.7...

Thanks!
Post Reply