php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32687 using -enable-zlib with --with-mysql causes possible mysql database corruption
Submitted: 2005-04-12 20:22 UTC Modified: 2005-04-13 09:53 UTC
From: elong1013 at comcast dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.0.4 OS: Fedora Core
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: elong1013 at comcast dot net
New email:
PHP Version: OS:

 

 [2005-04-12 20:22 UTC] elong1013 at comcast dot net
Description:
------------
compiling php 5.04 with the '-enable-zlib' option along with '--with-mysql' causes an 'Warning: mysql_query(): Unable to save result set' query to appear on older versions of PHP accessing the same database.

while preparing and testing an upgrade from the 4.3.9 version to the 5.0.4 version, i noticed that when i went back to my 4.3.9 version of the compiled code, i got 'Warning: mysql_query(): Unable to save result set'  for any SQL command after the 5.0.4 version did any database transactions.

i have 2 *seperate* machines with *identical* code accessing the same database.  Once the newer version is used, the older version does not work again.

If i remove the -with-zlib compile directive from the 5.0.4 version,  both versions work together correctly.

once again, the error message only comes up on the OLDER version, but i suspect the newer version changes something in the database that causes the older version to fail.

here are my compiler directives

./configure 
--prefix=/share/servers/php5 
--with-mysql=/usr/lib/mysql 
--with-apxs=/share/servers/httpd/bin/apxs 
--with-openssl=/share/servers/libs/ssl 
--with-jpeg-dir=/share/servers/libs/jpeg 
--with-freetype-dir=/usr/lib 
--with-gd=/share/servers/libs/gdlib 
--with-mcrypt=/share/servers/libs/mcrypt 
--enable-memory-limit 
--with-config-file-path=/share/servers/php5/conf 
-enable-zlib
--enable-ftp

I am running apache 1.3.33 w/ mod_ssl 2.8.22, here are the versions of all libs that i use for my server.

gd-2.0.33
mm-1.3.1
php-5.0.4
jpeg-6b
mod_ssl-2.8.22-1.3.33
apache_1.3.33
libmcrypt-2.5.7
openssl-0.9.7e
libpng-1.2.7

Reproduce code:
---------------
do any database operation (SELECT, UPDATE, INSERT, DELETE) using PHP 5.0.4 with enable-zlib enabled and the php.ini setting "zlib.output_compression = On"

database queries from a previous version of PHP will fail.

recompile without the -enable-zlib directive, and it will work correctly (after you restore your database tables)

MAKE SURE YOU HAVE A BACKUP OF YOUR DATABASE if you try this.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-13 02:13 UTC] elong1013 at comcast dot net
It has nothing to do with enable-zlib, i was mistaken.
 [2005-04-13 09:53 UTC] tony2001@php.net
No bug -> bogus.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 17:03:58 2022 UTC