On 3/11/2005 11:57 AM John Swartzentruber wrote:
I am running Fedora core3 with Apache 2.0.52 (from default RPMs), MySQL 4.1.10 (from RPMs from MySQL site), and PHP 5.0.3 built from source.
I'm going through the PHP manual and trying some of the mysqli examples. The last one I tried didn't work. The problem appears to be this line:
$row = $result->fetch_array(MYSQLI_ASSOC);
Using MYSQLI_BOTH also fails, and MYSQLI_NUM works.
This is what is in my httpd error log:
[Thu Mar 10 17:07:06 2005] [notice] child pid 29903 exit signal Segmentation fault (11)
I've reported this as a PHP bug and then continued to do some more research. What I'm finding is very odd.
When I run this script under apache, it appears that there is a clash between the structures used in a MySQL library and what is in the mysql.h header file. When I do a phpinfo(), it says that my mysqli client API version is "3.23.58". That seems wrong. I have MySQL 4.1.10a installed. This version difference *could* explain the difference, but I have no idea why it would be using the old version. The libmysql libraries and programs are all dated March 9, 2005 or later. The --with-mysqli configure parameter points to a mysql_config program with that date. Why would it think it was using an older API?
Another very weird thing is that when I run the script directly from the command line, the structure looks good and has all of the correct (i.e., expected) values. What is different about running PHP from the command line and from Apache that would cause it to use different MySQL structures?
Sorry to reply to myself, but here's the succinct question:
When I run phpinfo(), it says my mysqli API client version is 3.23.58. When I run "php -i" from the command line it says it is 4.1.10a. The latter is correct. What would cause the discrepancy? The server has been stopped and started many times, and PHP rebuilt a few times, so it isn't a browser buffer issue.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php