[freetds] Long column names and PHP

Frank M. Kromann frank at kromann.info
Sat Sep 30 01:57:48 EDT 2006


This is the output you get when you use the MSSQL extension on win32 linked
with ntwdblib.dll. The same extension can be linked with FreeTDS on win32,
but then you need to load the extension named php_dblib.dll.

- Frank

> When phpinfo() is run, this is what I get for the mssql section, even
> though I have changed the version to 8.0 in the freetds.conf file:
> 
> 
> mssql
>       MSSQL Supportenabled
>       Active Persistent Links 0 
>       Active Links 0 
>       Library version 7.0 
> 
>       DirectiveLocal ValueMaster Value
>       mssql.allow_persistentOnOn
>       mssql.batchsize00
>       mssql.compatability_modeOffOff
>       mssql.connect_timeout55
>       mssql.datetimeconvertOnOn
>       mssql.max_linksUnlimitedUnlimited
>       mssql.max_persistentUnlimitedUnlimited
>       mssql.max_procs2525
>       mssql.min_error_severity1010
>       mssql.min_message_severity1010
>       mssql.secure_connectionOffOff
>       mssql.textlimitServer defaultServer default
>       mssql.textsizeServer defaultServer default
>       mssql.timeout6060
> 
> 
> You can override the freetds.conf file by using putenv('TDSVER=80') to
> change the version.
> 
> Chris
> 
> -----Original Message-----
> From: freetds-bounces at lists.ibiblio.org
> [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of James K. Lowden
> Sent: Thursday, September 28, 2006 7:38 PM
> To: Frank M. Kromann; FreeTDS Development Group
> Subject: Re: [freetds] Long column names and PHP
> 
> Frank M. Kromann wrote:
> > Just checked PHP5.2 sources and there is no references to the TDS
> > version used.
> > 
> > All it displays is:
> > 
> > MSSQL Support => enabled
> > Active Persistent Links => 0
> > Active Links => 0
> > Library version => FreeTDS
> > 
> > I think it would be possible to show the default version, but as the
> > version can be specified in freetds.conf (per connection) it does not
> > make much sense to display it.
> 
> Thanks for looking into it Frank.  Now it's a mystery what the OP meant
> by
> "phpinfo() still reports 7.0".  
> 
> FWIW, I think it would still be worthwhile for a PHP script to be able
> to
> interrogate the connection to discover the TDS version currently in
> force.
>  Yes, one can set it in freetds.conf, but for a variety of reasons
> (wrong
> directory, wrong dataserver section, etc.) it might not get used.  
> 
> Regards, 
> 
> --jkl
> 
> > > Thomas, Christopher (LLU) wrote:
> > > > You are right that I was connecting using 4.2. I
> > > > couldn't find the version from the TDSDUMP. But I checked the
> output
> > > > from phpinfo() and it said 7.0, but I guess the freetds.conf file
> > > > overrides whatever PHP has selected. After I changed the version
> > inside
> > > > freetds.conf to 8.0, everything worked perfectly. Funny thing is
> > > > phpinfo() still reports 7.0. 
> > > 
> > > I don't know what PHP is doing.  Using a current snapshot and
> assuming
> > > you're using the mssql extension, you can see in the TDSDUMP log
the
> > order
> > > of db-lib calls.  And PHP could learn the TDS version only from the
> > db-lib
> > > function dbtds().  Anything else is just guesswork.  (If you're
> using
> > > ODBC, then I don't know.) 
> > > 
> > > We used to include the TDS version at the top of the log when
> > connecting. 
> > > I noticed it got dropped some time ago.  That was probably
> > > inadvertent, because I don't remember any discussion and can't see
> any
> > > advantage. 
> > I'll
> > > look into putting it back.  
> > > 
> > > Glad you posted.  If you were confused, someone else surely will
be,
> > too. 
> > > 
> > > 
> > > --jkl
> > > _______________________________________________
> > > FreeTDS mailing list
> > > FreeTDS at lists.ibiblio.org
> > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > > 
> > 
> > 
> > 
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS at lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 






More information about the FreeTDS mailing list