Please help.
Failure of PHP->ext.so->my.so->unixODBC->myodbc->mysql.
I used PHP->"C++ shared object(*.so)"->unixODBC->myodbc->mysql architecture.
I executed "php test.php" at command line. Then I got "segment fault" on tty.
I apply ODBC trace log. I found SQLConnect succeeded but SQLExecDirect was failed at the first "SELECT" statement.
I traced into unixODBC and found no return from myodbc's SQLEXECDIRECT. It seems dead in myodbc.
I had not traced into myodbc since no source code of myodbc. I installed myodbc with binary code.
Furthermore, I used "C binary: main()"->"C++ shared object(*.so)"->unixODBC->myodbc->mysql architecture to test.
Everything is OK. SQLExecDirect succeeded at every "SELECT" statement.
The "SELECT" statement is the same as php execution mode. I saw they are coincident in ODBC trace log.
The environment is:
Login linux with "root".
Connect ODBC with "DSN=testdb;UID=root;PWD=;". There is no password for "root" of mysql.
Some versions:
myodbc-connector 3.51.12
unixODBC 2.2.11
mysql Ver 11.18 Distrib 3.23.54, for redhat-linux-gnu (i386)
PHP 4.4.2 (cli) (built: Mar 19 2006 15:50:38)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-redhat-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
Failure of PHP->ext.so->my.so->unixODBC->myodbc-
Moderator: General Moderators
-
icyfire624
- Forum Newbie
- Posts: 2
- Joined: Sat Apr 01, 2006 4:45 am
-
icyfire624
- Forum Newbie
- Posts: 2
- Joined: Sat Apr 01, 2006 4:45 am
php contain mysql client api.
After tracing, I found two different test way caused different call of "mysql_init" and other mysql client api:
When I use "a.out" built from C source code (a.out->my.so->iodbc->myodbc->mysql) to test, myodbc used "mysql-init" within the libmysqlclient.so.
When I use "php test.php" (php->ext.so->my.so->iodbc->myodbc->mysql) to test, myodbc used "mysql_init" within "php". "php" client contained a "mysql_init" from its "ext/mysql".
So strange. And I have not found how to deal with it.
Please help me.
When I use "a.out" built from C source code (a.out->my.so->iodbc->myodbc->mysql) to test, myodbc used "mysql-init" within the libmysqlclient.so.
When I use "php test.php" (php->ext.so->my.so->iodbc->myodbc->mysql) to test, myodbc used "mysql_init" within "php". "php" client contained a "mysql_init" from its "ext/mysql".
So strange. And I have not found how to deal with it.
Please help me.