You are here: Re: cron not working when calling php script with mysql on linux box « PHP Programming Language « IT news, forums, messages
Re: cron not working when calling php script with mysql on linux box

Posted by dburdick on 08/28/06 01:01

dburdick@isound.com wrote:
> I was referred to this forum as this may be a php specific problem.
> Some kind of configuration problem maybe.
>
> I have some php files that connect to a mysql database and are run as
> cron jobs.
>
> The scripts work fine when run via the command line as root, but when
> run via the cron they cause a mysql connection error.
>
> Call to undefined function: mysql_pconnect()
>
> I have found some info on this and tried many things but none of them
> are working.
>
> Does this have something to do with setting the appropriate environment
> in php
> script? I read something about that but am not sure how or what to do.
>
> Please help!!!
>
> Thank you!


I believe i have narrowed this down.

I ran the same identical script with phpinfo() in it from 2 different
locations.

1 I ran from the command line and 1 I ran from the crontab.

The one that i ran from the crontab didn't not have mysql support
enabled.

Looks like that is the problem!

Why are these different?
How do i compile that php version with mysql support?

I believe this should solve this issue.

Thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация