Crontab Jobs + PHP5

Crontab Jobs + PHP5

Posted by: pc_michael
Posted on: 2005-08-18 23:07:00

I'm using PHP 5 for the simple_xml functions. I have a script I want to run with crontab, but when I try to run it, it says the simple_xml functions are undefined. So I'm assuming it's trying to use PHP 4. How can I get it to use PHP 5?

Thanks.

PCMichael
"Trying is the first step towards failure." ~ Homer Simpson

Re: Crontab Jobs + PHP5

Posted by: guice
Posted on: 2005-08-19 13:01:00

You'll need to locate the right PHP binary. Not sure exactly where it is...it's under cgi-system, relative URL, so I guess the best bet would be to figure out, on the file system, where cgi-system maps to.

Re: Crontab Jobs + PHP5

Posted by: ardco
Posted on: 2005-08-19 13:57:00

This kbase and its links seemed relevant. As was:

$ whereis php5
php5: /etc/php5 /usr/local/php5

$ whereis php
php: /etc/php /usr/local/bin/php /usr/local/lib/php

$ cd /etc/php/cgi

$ grep -i include php.ini

include_path = ".:/usr/local/lib/php" ; UNIX: "/path1:/path2"

$ cd /etc/php5/cgi

$ grep -i include php.ini
...
include_path = ".:/usr/local/php5/lib"
...

HTH. Good luck,

BobS

Tags: php 5php 4crontabundefinedphp5assumingjobs