Skip to Content.
Sympa Menu

freetds - [freetds] php, freetds and cron

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Hans Lang <hal AT mmg.de>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] php, freetds and cron
  • Date: Sun, 05 Jan 2003 23:24:51 +0100

Hi,

i have a problem when using a php-script that connects to a mssql 7.0 server within a cronjob.

i then get an error message

"PHP Warning: Sybase: Unable to connect in tagestipps.php on line 50"

line 50 says:

$MS_CONN=mssql_connect("$MS_SQL" , "$MS_USER" , "$MS_PASS" );


i do not get this message when calling the script by hand, but i get it always in a cron-job, no difference if i start the cron job as a normal user or as root, no difference wheter i start it via "php -q ... " or via "bash -c "php -q ..."" or whatever.

every environment-variable that is set during a normal login-session is set in the cron-script as well.

the script itself (should) read data from a database at 4am and creates html-files, that will be static for that day.

i tried to "wget" the script altough it does not return any output, just to get it executed, but this doesnt work either.

what am doing wrong, wheres my lack of knowledge?

hans





Archive powered by MHonArc 2.6.24.

Top of Page