From: phpb at lwnetwork dot com
Operating system: Linux RedHat
PHP version: 4.3.4
PHP Bug Type: MySQL related
Bug description: Flag "MYSQL_CLIENT_COMPRESS" not working
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
--
Edit bug report at http://bugs.php.net/?id=28071&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28071&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28071&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28071&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28071&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28071&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28071&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28071&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28071&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28071&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28071&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28071&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28071&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28071&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28071&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28071&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28071&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28071&r=float