Bug #12250 Updated: Segfault when using FreeTDS connect

From: Date: Tue, 18 Jun 2002 08:40:02 +0000
Subject: Bug #12250 Updated: Segfault when using FreeTDS connect
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11059@lists.php.net to get a copy of this message
ID: 12250 Updated by: derick@php.net Reported By: dmit@tkb.lv -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Linux 2.4.5 Slackware 8.0 PHP Version: 4.0.6 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-06-04 06:52:53] alexp@mail.lv 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" ); ------------------------------------------------------------------------ [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

« previous php.bugs (#11059) next »