ID: 41688 Updated by: [EMAIL PROTECTED] Reported By: gdegoulet at sdv dot fr -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Linux 2.6.10 #3 S PHP Version: 5.2.3 New Comment:
A couple of things to try. 1) Compile php using --with-mssql instead of --with-sybase. This will give you all the mssql_functions and you will be using the mssql extension and not the sybase extension. 2) Get the latest version of freeTDS. Previous Comments: ------------------------------------------------------------------------ [2007-06-14 14:03:38] gdegoulet at sdv dot fr Description: ------------ cat a.php <?php $db_name="azerty"; $db_user="azerty"; $db_pass="azerty"; $db_host="azerty.sdv.fr"; $link = mssql_connect($db_host, $db_user, $db_pass) or die('Could not connect: ' . mssql_get_last_message()); mssql_close($link); ?> Reproduce code: --------------- php 5.2.3 / freetds-0.62.4 Configure Command => './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc' '--enable-safe-mode' '--enable-memory-limit' '--with-xml' '--with-zlib' '--enable-inline-optimization' '--with-curl' '--with-mysql=/usr' '--with-freetype-dir=/usr' '--with-jpeg-dir' '--with-png-dir' '--with-gd' '--enable-gd-native-ttf' '--with-sybase=/usr' [EMAIL PROTECTED] php-5.2.3]# gdb /usr/local/bin/php GNU gdb Red Hat Linux (6.0post-0.20040223.19rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run ./a.php Starting program: /usr/local/bin/php ./a.php Error while mapping shared library sections: : Success. Error while reading shared library symbols: : No such file or directory. [Thread debugging using libthread_db enabled] [New Thread -1214368352 (LWP 14909)] Error while reading shared library symbols: : No such file or directory. Error while reading shared library symbols: : No such file or directory. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1214368352 (LWP 14909)] 0x0824c627 in zend_inline_hash_func (arKey=0xb7fe3000 <Address 0xb7fe3000 out of bounds>, nKeyLength=3073856464) at zend_hash.h:260 260 hash = ((hash << 5) + hash) + *arKey++; (gdb) where #0 0x0824c627 in zend_inline_hash_func (arKey=0xb7fe3000 <Address 0xb7fe3000 out of bounds>, nKeyLength=3073856464) at zend_hash.h:260 #1 0x0824bab7 in zend_hash_find (ht=0x839ab20, arKey=0xb79ad0b8 "sybase_azerty.sdv.fr_azerty_azerty__", nKeyLength=3080368920, pData=0x8f26c2a1) at /usr/local/src/php-5.2.3/Zend/zend_hash.c:870 #2 0x08202da9 in php_sybase_do_connect (ht=-1893285215, return_value=0xb79ad0a0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, persistent=0) at /usr/local/src/php-5.2.3/ext/sybase/php_sybase_db.c:495 #3 0x082039cc in zif_sybase_connect (ht=3, return_value=0xb79ad0a0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /usr/local/src/php-5.2.3/ext/sybase/php_sybase_db.c:570 #4 0x0825b49e in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffd640) at zend_vm_execute.h:200 #5 0x0825ad6d in execute (op_array=0xb79ac874) at zend_vm_execute.h:92 #6 0x08244415 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-5.2.3/Zend/zend.c:1134 #7 0x08211255 in php_execute_script (primary_file=0xbffff9c0) at /usr/local/src/php-5.2.3/main/main.c:1794 #8 0x0829e07a in main (argc=2, argv=0xbffffa94) at /usr/local/src/php-5.2.3/sapi/cli/php_cli.c:1138 (gdb) quit Expected result: ---------------- simply open - close database connection or die Actual result: -------------- [EMAIL PROTECTED] php-5.2.3]# php a.php Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41688&edit=1