unixODBC support not working with PHP4beta4
| From: | Luc Bouchard | Date: | Mon, 21 Feb 2000 22:15:49 +0000 |
| Subject: | unixODBC support not working with PHP4beta4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10616@lists.php.net to get a copy of this message | ||
Hello all,
unixOBDC support doesn't seems to work with PHP4 beta 4 (CGI version). It
segfaults when the cgi ends.
I have unixODBC-1.8.5 installed.
I'm trying to execute the following script:
<?PHP
$DSN="myodbc";
$uid="";
$pwd="";
$myDB = odbc_connect($DSN,$uid,$pwd);
$query = "SELECT * FROM datatypes";
$result = odbc_exec($myDB, $query);
$report = odbc_fetch_row($result);
echo odbc_result($result, 1);
odbc_close($myDB);
PHP?>
Everything works and the result is displayed, but the call to odbc_close()
fails and the CGI segfaults at the end of the script.
Here is the backtrace after the SEGFAULT:
#0 0x4002eabc in SQLFreeStmt (statement_handle=135424896, option=1) at
SQLFreeStmt.c:141
#1 0x8092d1a in _free_odbc_result (res=0x8126b54) at php_odbc.c:158
#2 0x8088416 in list_entry_destructor (ptr=0x8127864) at zend_list.c:214
#3 0x80871a4 in zend_hash_del_key_or_index (ht=0x80fefa0, arKey=0x0,
nKeyLength=0, h=2, flag=1) at zend_hash.c:499
#4 0x80881e5 in zend_list_delete (id=2) at zend_list.c:54
#5 0x8083b1d in _zval_dtor (zvalue=0x8126b1c, __zend_filename=0x80cbebc
"zend_execute_API.c", __zend_lineno=231) at zend_variables.c:80
#6 0x807ebea in _zval_ptr_dtor (zval_ptr=0x81278a8,
__zend_filename=0x80cc685 "zend_variables.c", __zend_lineno=180) at
zend_execute_API.c:231
#7 0x8083d33 in _zval_ptr_dtor_wrapper (zval_ptr=0x81278a8) at
zend_variables.c:180
#8 0x8087290 in zend_hash_destroy (ht=0x80fee80) at zend_hash.c:528
#9 0x807ea94 in shutdown_executor () at zend_execute_API.c:137
#10 0x8084636 in zend_deactivate () at zend.c:464
#11 0x8072d4a in php_request_shutdown (dummy=0x0) at main.c:670
#12 0x8058814 in main (argc=2, argv=0xbffffc24) at cgi_main.c:611
I tried with MyODBC-2.50.28 and with the Sybase ODBC driver for ASE, both
failed the same way. The problem seems to happens when PHP destroys all its
symbols, but I don't know much about how PHP works internally.
Anybody knows what's wrong ?
Thanks.
________________________
Luc Bouchard, Ing.
GameLoft.com
mailto:lbouchard@gameloft.com
http://www.gameloft.com