PHP 4.0 Bug #4704: PHP crashes although ODBC appears to work occasionally
| From: | cnewbill at onewest dot net | Date: | Tue, 30 May 2000 18:35:12 +0000 |
| Subject: | PHP 4.0 Bug #4704: PHP crashes although ODBC appears to work occasionally | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19796@lists.php.net to get a copy of this message | ||
From: cnewbill@onewest.net
Operating system: Redhat Linux 6.2
PHP version: 4.0.0 Release
PHP Bug Type: ODBC related
Bug description: PHP crashes although ODBC appears to work occasionally
There are alot of SQL related compiler warnings when compiling PHP as follows
./configure --with-mysql --enable-trans-sid --enable-track-vars --enable-track-errors --with-esoob
--with-apxs=/home/cnewbill/testapache/bin/apxs
These warnings appear whether I compile as CGI or static Apache Module. They occur for virtually
every ODBC function so I will only include a couple lines since they are all the same.
php_odbc.c: In function `_free_odbc_result':
php_odbc.c:158: warning: passing arg 1 of `SQLFreeStmt' makes integer from pointer without a
cast
php_odbc.c: In function `_close_odbc_conn':
php_odbc.c:177: warning: passing arg 1 of `SQLDisconnect' makes integer from pointer without a
cast
I am using EasySoft OOB and the bundled unixODBC driver manager.
(gdb) bt
#0 0x40293ca0 in ?? ()
#1 0x401619d1 in __libc_start_main () at ../sysdeps/generic/libc-start.c:92
One note I am having better luck with PHP4 as a DSO.
Example script
<?
$conn_id = odbc_connect("onewest","*******","******")
if ($conn_id == "") {
print "Could not connect.\n";
} else {
print "Connected!!\n";
}
?>
output from CGI php
[root@ns dosojin]# php odbc_test.html
X-Powered-By: PHP/4.0.0
Content-type: text/html
Connected!!
Segmentation fault (core dumped)