|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-19 07:58 UTC] dmit at tkb dot 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 15:00:02 2025 UTC |
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" );I'm having the same problem. RH 7.2/PHP 4.2.1 mssql_connect(); Program received signal SIGSEGV, Segmentation fault. __inet_aton (cp=0x0, addr=0xbfffe400) at inet_addr.c:130 130 inet_addr.c: No such file or directory. in inet_addr.c (gdb) bt #0 __inet_aton (cp=0x0, addr=0xbfffe400) at inet_addr.c:130 #1 0x401edf6f in inet_addr (cp=0x0) at inet_addr.c:96 #2 0x4003c4cb in tds_connect (login=0x816dc68, parent=0x816b658) at login.c:168 #3 0x40034e7f in tdsdbopen (login=0x8163960, server=0x816dba4 "ProcessLog") at dblib.c:442 #4 0x080ab670 in php_sybase_do_connect (ht=3, return_value=0x816dc1c, this_ptr=0x0, return_value_used=0, persistent=0) at php_sybase_db.c:535 #5 0x080ab7c9 in zif_sybase_connect (ht=3, return_value=0x816dc1c, this_ptr=0x0, return_value_used=0) at php_sybase_db.c:582 #6 0x080eaa6b in execute (op_array=0x8165ddc) at ./zend_execute.c:1598 #7 0x080d1b36 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810 #8 0x0805f601 in php_execute_script (primary_file=0xbffffab0) at main.c:1381 #9 0x0805d5d0 in main (argc=2, argv=0xbffffb54) at cgi_main.c:778 #10 0x40112507 in __libc_start_main (main=0x805ccf4 <main>, argc=2, ubp_av=0xbffffb54, init=0x805b744 <_init>, fini=0x80ef590 <_fini>, rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffffb4c) at ../sysdeps/generic/libc-start.c:129