Skip to Content.
Sympa Menu

freetds - Re: [freetds] php, freetds and cron

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Frank M. Kromann" <frank AT kromann.info>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] php, freetds and cron
  • Date: Sun, 05 Jan 2003 14:54:51 -0800

Hi,

If $MS_SQL contains an alias for database you might have a problem reading
the cinfiguration file. Tou could try to use the IP address directly.

BTW. From PHP 4.3.0 you can compile PHP using --with-mssql or
--with-mssql=/path/to/freetds. This will enable the full MSSQL api and not
only the few functions aliased in the Sybase extension. This will not have
any impact your error though.

- Frank

> 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
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>







Archive powered by MHonArc 2.6.24.

Top of Page