note 46220 modified in function.mssql-connect by danbrown
| From: | danbrown@php.net | Date: | Sun, 07 Dec 2008 19:47:00 +0000 |
| Subject: | note 46220 modified in function.mssql-connect by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-147877@lists.php.net to get a copy of this message | ||
It looks like by default libphp5 ignores freetd's conf file if you
specify your SQL server's ip address within the mssql_connect() function.
If you need to utilize freetds.conf file for connection parameters use the putenv function as
follows
<?php
putenv('FREETDSCONF='path to your freetds conf. file')
/*
SQL CODE
mssql_connect('MSSQL_2000, 'user' , 'pwd');
....
....
*/
?>
All connection parameters should now be read from the conf file. Also don't enable logging
unless you're debugging, performace will suffer.
/* freetds.conf
[MSSQL_2000]
host = 192.168.10.10
port = 1433
tds version = 8.0
; dump file = /etc/freetds/log/freetds.log
; dump file append = yes
; debug level = 99
*/
--was--
It looks like by default libphp5 ignores freetd's conf file if you
specify your SQL server's ip address within the mssql_connect() function.
If you need to utilize freetds.conf file for connection parameters use the putenv function as
follows
<?
putenv('FREETDSCONF='path to your freetds conf. file')
/*
SQL CODE
mssql_connect('MSSQL_2000, 'user' , 'pwd');
....
....
*/
?>
All connection parameters should now be read from the conf file. Also don't enable logging
unless you're debugging, performace will suffer.
/* freetds.conf
[MSSQL_2000]
host = 192.168.10.10
port = 1433
tds version = 8.0
; dump file = /etc/freetds/log/freetds.log
; dump file append = yes
; debug level = 99
*/
http://php.net/manual/en/function.mssql-connect.php