ID: 28081 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Linux PHP Version: 4CVS-2004-04-20 (stable) -Assigned To: +Assigned To: fmk New Comment:
This sounds like a problem with FreeTDS, but I'll take a closer look at the code. Previous Comments: ------------------------------------------------------------------------ [2004-04-20 19:41:17] [EMAIL PROTECTED] Description: ------------ Similar to bug #11490. mssql_connect (and mssql_pconnect) segfault when called witout the user/password parameters. Using PHP CVS Snap from today, FreeTDS v 0.53-7 (Debian Unstable). Reproduce code: --------------- echo "Connected: ". ( mssql_pconnect("some_instance") ? 'yes' : 'no' ) ."\n"; Expected result: ---------------- No Segfault, uses the interfaces/freetds.conf file for user/pass info. Actual result: -------------- Warning: mssql_pconnect(): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in mssql_test2.php on line 3 Segmentation fault (gdb) bt #0 0x402785f3 in tds_reset_msg_info () from /usr/lib/libsybdb.so.1 #1 0x4027470d in dblib_handle_err_message () from /usr/lib/libsybdb.so.1 #2 0x4027852e in tds_process_column_row () from /usr/lib/libsybdb.so.1 #3 0x4027697f in tds_process_default_tokens () from /usr/lib/libsybdb.so.1 #4 0x40276b5d in tds_process_login_tokens () from /usr/lib/libsybdb.so.1 #5 0x40279c6c in tds_connect () from /usr/lib/libsybdb.so.1 #6 0x40271e33 in tdsdbopen () from /usr/lib/libsybdb.so.1 #7 0x40264e9f in php_mssql_do_connect (ht=1, return_value=0x8196db4, this_ptr=0x0, return_value_used=1, persistent=1) at /home/sean/php4-STABLE-200404122030/ext/mssql/php_mssql.c:501 #8 0x40265491 in zif_mssql_pconnect (ht=1, return_value=0x8196db4, this_ptr=0x0, return_value_used=1) at /home/sean/php4-STABLE-200404122030/ext/mssql/php_mssql.c:684 #9 0x0811f1fa in execute (op_array=0x8199c44) at /home/sean/php/stable/Zend/zend_execute.c:1637 #10 0x0810fc28 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/sean/php/stable/Zend/zend.c:886 #11 0x080ed383 in php_execute_script (primary_file=0xbffffca8) at /home/sean/php/stable/main/main.c:1731 #12 0x08125cac in main (argc=4, argv=0xbffffd24) at /home/sean/php/stable/sapi/cli/php_cli.c:822 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28081&edit=1