note 32678 deleted from function.mssql-connect by sniper

From: Date: Wed, 21 Jan 2004 10:55:12 +0000
Subject: note 32678 deleted from function.mssql-connect by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63940@lists.php.net to get a copy of this message
Note Submitter: aissam@yahoo.com ---- You don't need to reconfigure/reinstall all php. you could use phpize 'n libtool. i've MDK 9.1, and already installed freetds i installed php-devel package with contains php extensions (/usr/src/php-devel/ext) here's the full step, of what i've done #cd /usr/src/php-devel/ext/mssql #phpize this create configure file #./configure --with-mssql=/usr/path/to/freetds #make if you make install we'll get /usr/lib/php/extensions/mssql.so: undefined symbol: dbinit when u'll try to restart apache (i'm using mod_php) you need to run #./libtool --mode=link gcc -L/usr/path/to/freetdsl/lib -lsybdb -I. -I/usr/src/php-devel -DEAPI -g -02 -o php_mssql.la -avoid-version -module -rpath /usr/src/php-devel/ext/mssql/modules php_mssql.lo this command create the php_mssql.so on .libs directory, congratulation ;) all u need now is to copy the php_mssql.so to php extension dir (see php.ini) #grep extension_dir /etc/php.ini extension_dir = /usr/lib/php/extensions #cp .libs/php_mssql.so /usr/lib/php/extensions/mssql.so edit now php.ini and add (on dynamic extension section) extension=php_mssql.so and restart apache #apachectl restart don't forget to add the server on freetds.conf an eg. [MYSQLSERVER] host=sqlserver.mydomain.dot.not.net port=1433 tds version = 7.0 all u need now is to test this ;) <? $conn=mssql_connect("MYSQLSERVER","sa",'password'); if ($conn) { echo "Yeah i'm the best ;)"; } else { echo "Woops ! ".mssql_get_last_message(); } ?> Have fun all ;)

« previous php.notes (#63940) next »