Skip to Content.
Sympa Menu

freetds - Re: [freetds] server configuration in freetds.conf doesn't appear to be available in PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Robert Gonzalez <robert AT robert-gonzalez.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] server configuration in freetds.conf doesn't appear to be available in PHP
  • Date: Mon, 24 May 2010 15:45:43 -0700

The environment variable you want to set is FREETDSCONF and you are going to
want to add it not only to your own profile's environment vars but your web
servers as well.

I talk about it in this article:
http://www.robert-gonzalez.com/2009/02/18/building-the-php-ms-sql-server-extension-from-source-on-ubuntu-810/

On Mon, May 24, 2010 at 3:33 PM, Ben Vogan <benvogan AT hotmail.com> wrote:

>
> Hello All,
> I am trying to get freetds up and running in PHP 5.3.2 on Apache 2.2.14. I
> have downloaded the latest snapshot and ./configured it. Using tsql I am
> able to connecto to my SQL Server instance using the -S option so it appears
> that freetds is recognizing the server configuration. However, when I try
> to call mssql_connect in PHP with the alias for my server it fails (no error
> message, it just returns false). When I specify the DNS name for the server
> then mssql_connect call works just fine. I tried editing the freetds.conf
> file to turn on logging but no log file appears in the /tmp directory. I
> also tried explicity setting the TDSDUMP and TDSDUMPCONFIG environment
> variables but the log files are not created when I call mssql_connect from
> my PHP page. I also tried setting the FREETDS environment variable to point
> to my freetds.conf file without success.
> Getting the PHP info from the webserver shows under a mssql heading:Active
> Persisten Links 0Active Links 0Library version FreeTDS
> Directive Local Value Master Valuemssql.allow_persistent On
> Onmssql.batchsize 0 0mssql.charset no value no
> valuemssql.compatability_mode Off Offmssql.connect_timeout
> 5 5mssql.datetimeconvert On Onmssql.max_links Unlimited
> Unlimitedmssql.max_persistent Unlimited Unlimitedmssql.max_procs
> Unlimited Unlimitedmssql.min_error_severity 10
> 10mssql.min_message_severity 10 10mssql.secure_connection Off
> Offmssql.textlimit Server default Server defaultmssql.textsize
> Server default Server defaultmssql.timeout 60 60
> Any help would be greatly appreciated.
> Thanks,--Ben
> _________________________________________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
> https://signup.live.com/signup.aspx?id=60969
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



--
Robert Gonzalez
http://www.robert-gonzalez.com
http://twitter.com/RobertGonzalez
http://www.linkedin.com/in/robertanthonygonzalez




Archive powered by MHonArc 2.6.24.

Top of Page