Description:
Using stock FC3 php (with php-odbc) and MySQL 4.1.7 (RPMS downloaded from mysql.com) causes a segfault during odbc_connect with MyODBC-3.51.09.
The php script is very simple:
<?php
$conn = odbc_connect("testdb", "", "");
?>
With the following in odbc.ini:
[ODBC Data Sources]
testdb = MySQL ODBC 3.51 Driver DSN
[testdb]
Driver = /usr/lib/libmyodbc3.so
Description = MySQL ODBC 3.51 Driver DSN
SERVER = localhost
PORT =
USER = bos
Password =
Database = test
OPTION = 3
SOCKET =
Running php cli under gdb gives me the following backtrace:
#0 0xb7704a54 in strxmov () from /usr/lib/libmysqlclient.so.10
#1 0xb75c9427 in SQLConnect () from /usr/lib/libmyodbc3.so
#2 0xb76882b6 in SQLConnect () from /usr/lib/libodbc.so.1
#3 0xb772985a in odbc_sqlconnect () from /usr/lib/php4/odbc.so
#4 0xb7729dc7 in odbc_do_connect () from /usr/lib/php4/odbc.so
#5 0xb772a063 in zif_odbc_connect () from /usr/lib/php4/odbc.so
#6 0x08154f4c in execute ()
#7 0x08144400 in zend_execute_scripts ()
#8 0x0811b6be in php_execute_script ()
#9 0x00000000 in ?? ()
Maybe the cause is the fact that MySQL-shared-compat libraries are installed and not MySQL-shared?
Also interesting is that when I give username and a password as part of odbc_connect it doesn't segfault but gives me the following message instead:
PHP Warning: odbc_connect(): SQL error: [unixODBC][MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client, SQL state S1000 in SQLConnect in t1.php on line 9
How to repeat:
Install MySQL 4.1.7 and MyODBC on FC3 (including MySQL-shared-compat package).
Add above lines into the odbc.ini (swapping username for one with access)
Run provided sample script.
Description: Using stock FC3 php (with php-odbc) and MySQL 4.1.7 (RPMS downloaded from mysql.com) causes a segfault during odbc_connect with MyODBC-3.51.09. The php script is very simple: <?php $conn = odbc_connect("testdb", "", ""); ?> With the following in odbc.ini: [ODBC Data Sources] testdb = MySQL ODBC 3.51 Driver DSN [testdb] Driver = /usr/lib/libmyodbc3.so Description = MySQL ODBC 3.51 Driver DSN SERVER = localhost PORT = USER = bos Password = Database = test OPTION = 3 SOCKET = Running php cli under gdb gives me the following backtrace: #0 0xb7704a54 in strxmov () from /usr/lib/libmysqlclient.so.10 #1 0xb75c9427 in SQLConnect () from /usr/lib/libmyodbc3.so #2 0xb76882b6 in SQLConnect () from /usr/lib/libodbc.so.1 #3 0xb772985a in odbc_sqlconnect () from /usr/lib/php4/odbc.so #4 0xb7729dc7 in odbc_do_connect () from /usr/lib/php4/odbc.so #5 0xb772a063 in zif_odbc_connect () from /usr/lib/php4/odbc.so #6 0x08154f4c in execute () #7 0x08144400 in zend_execute_scripts () #8 0x0811b6be in php_execute_script () #9 0x00000000 in ?? () Maybe the cause is the fact that MySQL-shared-compat libraries are installed and not MySQL-shared? Also interesting is that when I give username and a password as part of odbc_connect it doesn't segfault but gives me the following message instead: PHP Warning: odbc_connect(): SQL error: [unixODBC][MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client, SQL state S1000 in SQLConnect in t1.php on line 9 How to repeat: Install MySQL 4.1.7 and MyODBC on FC3 (including MySQL-shared-compat package). Add above lines into the odbc.ini (swapping username for one with access) Run provided sample script.