Re: [PHP] php script fails when run from cron

2006-05-04 Thread Richard Lynch
It's remotely possible that your database classes are trying to create temp files or cache files or something in the current working directory which for cron would be... The home directory of the user running it??? I don't even know what it would be, but I know it can be problematic. The cron

RE: [PHP] php script fails when run from cron

2006-05-04 Thread Jay Blanchard
[snip] The code then goes on to move some data from a remote SQL Server db to the local mysql. When finished, the log stops at got two classes. I am trying to debug now to see which of the two classes it seems to be failing on. I don't have anything in the php error log. The MSSQL connection

Re: [PHP] php script fails when run from cron

2006-05-04 Thread blackwater dev
I finally got it working and Chris was correct. It appears that cron was using the wrong php. Pumping the errors of even logging them wouldn't have helped as I was tweaking the ini for the php I thought it was using. When I explicitly tell it which one to use, it seems to work fine. Thanks!

[PHP] php script fails when run from cron

2006-05-03 Thread blackwater dev
I have a script which runs fine from the command line but when I try to run it via cron, it seems to fail when the db class is instatiated, here is some code: $yesterday = date(Y-m-d,mktime(0, 0, 0, date(m) , date(d)-1, date(Y))); $file=fopen(/usr/local/apache2/htdocs/core/logs/import.log,a);

Re: [PHP] php script fails when run from cron

2006-05-03 Thread Chris
blackwater dev wrote: I have a script which runs fine from the command line but when I try to run it via cron, it seems to fail when the db class is instatiated, here is some code: $yesterday = date(Y-m-d,mktime(0, 0, 0, date(m) , date(d)-1, date(Y)));

Re: [PHP] php script fails when run from cron

2006-05-03 Thread Chris
blackwater dev wrote: Chris, The double php thing is very likely as it is a box from my host and I installed php5 so I think php4 is on there somewhere as well without mssql support. I am simply running it like 15 21 * * * php /usr/local/apache2/htdocs/import.php How can I tell it which