Bug #12250 Updated: Segfault when using FreeTDS connect
| From: | alexp at mail dot lv | Date: | Tue, 04 Jun 2002 10:52:54 +0000 |
| Subject: | Bug #12250 Updated: Segfault when using FreeTDS connect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9449@lists.php.net to get a copy of this message | ||
ID: 12250
Updated by: alexp@mail.lv
Reported By: dmit@tkb.lv
Status: Open
Bug Type: MSSQL related
Operating System: Linux 2.4.5 Slackware 8.0
PHP Version: 4.0.6
New Comment:
Did you add entry for you SQL server in freetds.conf? PHP always
segfaults when server not found in config. At least it does for me.
Edit freetds.conf
---
# A typical Microsoft SQL Server 6.x configuration
[MyServer65]
host = ntmachine.domain.com
port = 1433
tds version = 4.2
---
$connect_id = mssql_pconnect("MyServer65" , "user" , "abcdefg" );
Previous Comments:
------------------------------------------------------------------------
[2001-07-19 07:58:11] dmit@tkb.lv
Linux 2.4.5 Slackware 8.0
FreeTDS 0.52:
./configure --with-tdsver=4.2 --enable-msdblib --enable-dbmfix
--with-gnu-ld --enable-shared --enable-static
PHP 4.0.6:
./configure --with-sybase=/usr/local/freetds
--with-openssl=/usr/src/openssl-0.9.6b
--with-apache=/usr/src/apache_1.3.20 --with-mysql=/usr/local/mysql/
--enable-track-vars
Apache 1.3.20:
./configure --prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a --disable-module=imap
Configures OK, compilation successfull, then
SYBASE=/usr/local/freetds
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
export SYBASE LD_LIBRARY_PATH
/usr/local/apache/bin/apachectl start
Standard PHP functions work, but when trying to connect to MS SQL 6.5
server Apache segfaults:
[notice] child pid 24856 exit signal Segmentation fault (11)
PHP script used:
<?php
$connect_id = mssql_connect("server" , "user" , "abcdefg" );
?>
And exactly the same:
<?php
$connect_id = mssql_pconnect("server" , "user" , "abcdefg" );
?>
Any solutions?
Tried to compile PHP with ctlib (--with-sybase-ct=/usr/local/freetds)
and after patching some source to remove -lsybtcl -lcs -lcomn -lintl
compilation went successfull, but finally Apache segfaults the same
way.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12250&edit=1