Skip to Content.
Sympa Menu

freetds - Re: apache+php+freetds segmentation fault

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Dmitry Komarov <dmit AT tkb.lv>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: apache+php+freetds segmentation fault
  • Date: Thu, 19 Jul 2001 15:07:30 +0400


Hello Brian,

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.

Wednesday, July 18, 2001, 3:18:18 PM, you wrote:

BB> This generally happens when freetds can't find the server. Either because
BB> it's missing from the freetds.conf file or if you're using the interfaces
BB> file, you don't have $SYBASE set to the installation directory. A less
BB> likely reason is you don't have $LD_LI?RARY_PATH or ld.so.conf modified to
BB> include the path to $SYBASE/lib.

BB> make sure you are export SYBASE prior to launching apache or putting the
BB> SetEnv SYBASE /usr/local/freetds directory in httpd.conf

BB> I'm trying to get a patch together to fix (to at least return an
BB> intelligent message) this but been busy with big endian patches (TDS 7 now
BB> works on Sparc and LinuxPPC if you use the CVS version with a couple small
BB> issues to still resolve, thank Paul Schaap for doing the testing on this
BB> one).

BB> Another possibility is you are running into the DBM conflict, in which
BB> case configure freetds with the --with-dbmfix flag.

BB> If none of this works, there were some bugs in 0.52 dealing with the
BB> interfaces file handling on some platforms. Try using the latest CVS
BB> snapshot and let me know how it works.

BB> Brian


--
Best regards,
Dmitry mailto:dmit AT tkb.lv






Archive powered by MHonArc 2.6.24.

Top of Page