Hi,
I have Mysql-4.0-14, MyODBC 3.51.06 and unixODBC 2.2.0. They are working
perfectly together
(isql works correctly) but php-4.3.x always crashes when I try
odbc_connect() on
the same DSN I use with isql (env vars are correctly set).

Is this a known bug?

This is a bt of a simplified example that leads to crash:

[EMAIL PROTECTED] php-4.3.4]# gdb sapi/cli/php
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 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"...
(gdb) run
Starting program: /root/apache/php-4.3.4/sapi/cli/php
[New Thread 1024 (LWP 15719)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 15719)]
0x080839ee in strxmov (dst=0x8513ab9 "", src=0x204d <Address 0x204d out of
bounds>)
    at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26
26          while ((*dst++ = *src++)) ;
(gdb) bt
#0  0x080839ee in strxmov (dst=0x8513ab9 "", src=0x204d <Address 0x204d out
of bounds>)
    at /root/apache/php-4.3.4/ext/mysql/libmysql/strxmov.c:26
#1  0x401fe68a in set_connect_defaults () from /usr/local/lib/libmyodbc3.so
#2  0x401fed73 in SQLConnect () from /usr/local/lib/libmyodbc3.so
#3  0x400b338a in SQLConnect () from /usr/lib/libodbc.so.1
#4  0x0808b37f in odbc_sqlconnect (conn=0xbfffa1d0, db=0x8520bd4 "mysql",
uid=0x8520afc "root", pwd=0x85130ac "root", cur_opt=2,
    persistent=0) at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2118
#5  0x0808bd1e in odbc_do_connect (ht=3, return_value=0x851326c,
this_ptr=0x0, return_value_used=1, persistent=0)
    at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2316
#6  0x0808b019 in zif_odbc_connect (ht=3, return_value=0x851326c,
this_ptr=0x0, return_value_used=1)
    at /root/apache/php-4.3.4/ext/odbc/php_odbc.c:2045
#7  0x0819201f in execute (op_array=0x8233d00) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1616
#8  0x08192252 in execute (op_array=0x8222818) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1660
#9  0x08175206 in call_user_function_ex (function_table=0x81df0a8,
object_pp=0x0, function_name=0x84393f4, retval_ptr_ptr=0xbfffb58c,
    param_count=2, params=0x8520a24, no_separation=1, symbol_table=0x0) at
/root/apache/php-4.3.4/Zend/zend_execute_API.c:567
#10 0x08174998 in call_user_function (function_table=0x81df0a8,
object_pp=0x0, function_name=0x84393f4, retval_ptr=0x85209e4,
    param_count=2, params=0xbfffb618) at
/root/apache/php-4.3.4/Zend/zend_execute_API.c:409
#11 0x080ad227 in ps_call_handler (func=0x84393f4, argc=2, argv=0xbfffb618)
at /root/apache/php-4.3.4/ext/session/mod_user.c:60
#12 0x080ad3d5 in ps_open_user (mod_data=0x81dabb0, save_path=0x81e46a8
"/tmp", session_name=0x81e4760 "nemoSession")
    at /root/apache/php-4.3.4/ext/session/mod_user.c:98
#13 0x080a8eec in php_session_initialize () at
/root/apache/php-4.3.4/ext/session/session.c:598
#14 0x080aa366 in php_session_start () at
/root/apache/php-4.3.4/ext/session/session.c:1047
#15 0x080abeb4 in zif_session_start (ht=0, return_value=0x852078c,
this_ptr=0x0, return_value_used=0)
    at /root/apache/php-4.3.4/ext/session/session.c:1486
#16 0x0819201f in execute (op_array=0x821e8ec) at
/root/apache/php-4.3.4/Zend/zend_execute.c:1616
#17 0x0817fd00 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/root/apache/php-4.3.4/Zend/zend.c:884
#18 0x08147956 in php_execute_script (primary_file=0xbfffe6e0) at
/root/apache/php-4.3.4/main/main.c:1729
#19 0x081987ae in main (argc=1, argv=0xbfffe784) at
/root/apache/php-4.3.4/sapi/cli/php_cli.c:819
#20 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6


Thanks,
                Nico

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to