php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28071 Flag "MYSQL_CLIENT_COMPRESS" not working
Submitted: 2004-04-20 05:13 UTC Modified: 2004-04-21 00:24 UTC
From: phpb at lwnetwork dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.4 OS: Linux RedHat
Private report: No CVE-ID: None
 [2004-04-20 05:13 UTC] phpb at lwnetwork dot com
Description:
------------
Tested with: PHP 4.3.4 / MySQL 4.0.18

I have been testing MYSQL_CLIENT_COMPRESS flag in mysql_connect funcion and compressed protocol is not used, data is transfered from client/server in no compressed way.

mytest.php :
---------------------- 
$mycmsconn=mysql_connect("$dbip","$dblogin","$dbpass",false,MYSQL_CLIENT _COMPRESS);
$mycmsdataquery="SELECT * FROM foo";
$mycmsdataresult = mysql_query($mycmsdataquery,$mycmsconn); $mycmsdatarow = mysql_fetch_array($mycmsdataresult);
-----------------------

I test versus my firewall : 

29 2486 3685K ACCEPT tcp -- any any anywhere anywhere state ESTABLISHED tcp spt:mysql 29 1249 65053 ACCEPT tcp -- any any anywhere anywhere state NEW,ESTABLISHED tcp dpt:mysql 

then i restart my firewall and do :

mytest.php :
------------------------ $mycmsconn=mysql_connect("$dbip","$dblogin","$dbpass",false,MYSQL_CLIENT_COMPRESS);
$mycmsdataquery="SELECT * FROM foo";
$mycmsdataresult = mysql_query($mycmsdataquery,$mycmsconn);
$mycmsdatarow = mysql_fetch_array($mycmsdataresult);
------------------------ 

/etc/init.d/firewall.sh status | grep mysql 

29 2486 3684K ACCEPT tcp -- any any anywhere anywhere state ESTABLISHED tcp spt:mysql 29 1249 65053 ACCEPT tcp -- any any anywhere anywhere state NEW,ESTABLISHED tcp dpt:mysql 


(needless to say that the database server is on a remote host....)


(Info copied from Sebastian, as he got same problem as me and tested with a firewall)

Regards, Alex


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-20 17:48 UTC] georg@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Please provide information about php configuration (incl. 
mysql client library) and MySQL Server configuration. 
What does SHOW VARIABLES LIKE \'have_compress\' show? 
 [2004-04-20 19:12 UTC] phpb at lwnetwork dot com
There isn't 'HAVE_COMPRESS' variable in mysql server.
So this is probably mysql related and not php bug.

| have_bdb                        | NO 
| have_crypt                      | YES 
| have_innodb                     | DISABLED 
| have_isam                       | YES 
| have_raid                       | NO  
| have_symlink                    | YES 
| have_openssl                    | NO  
| have_query_cache                | YES
...
| version                         | 4.0.18-standard 
| version_comment                 | Official MySQL RPM 


configuration (incl. mysql client library)
------------------------------------------
mysql
MySQL Support enabled 
Active Persistent Links  0  
Active Links  0  
Client API version  3.23.49  
MYSQL_MODULE_TYPE  builtin  
MYSQL_SOCKET  /var/tmp/mysql.sock  
MYSQL_INCLUDE  no value  
MYSQL_LIBS  no value
 [2004-04-21 00:24 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your server does not appear to support compression, hence 
the 'problem'. This is not a PHP bug. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 01:01:33 2024 UTC