#29265 [Opn->Csd]: mysqli_options Compression Constant

From: Date: Mon, 26 Jul 2004 13:16:16 +0000
Subject: #29265 [Opn->Csd]: mysqli_options Compression Constant
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969362167@lists.php.net to get a copy of this message
ID: 29265 Updated by: nlopess@php.net Reported By: bommar33 at msu dot edu -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows 2k3 PHP Version: 5.0.0 New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. If you want to compress the connection, you should use the MYSQLI_OPT_COMPRESS constant in mysqli_real_connect: mysqli_real_connect($link, $hostname, $username, $password, $dbname, $port, $socket, MYSQLI_CLIENT_COMPRESS); Previous Comments: ------------------------------------------------------------------------ [2004-07-19 20:58:03] bommar33 at msu dot edu Description: ------------ The mysqli_real_connect page and the mysqli_options pages differ on the valid option constants that may be passed to mysqli_options. mysqli_real_connect appears to have been updated, while mysqli_options is outdated. On the mysqli_options page, the constant for using the compressed protocol is listed as 'MYSQLI_OPT_COMPRESS.' This, however, results in incorrect behavior. The mysqli_real_connect page lists the constant as 'MYSQLI_CLIENT_COMPRESS,' which does produce the correct behavior. Reproduce code: --------------- //As suggested by mysqli_options documentation $MyConn = mysqli_init(); $MyConn->options( MYSQLI_OPT_COMPRESS, 1 ); if(! $MyConn->real_connect( ... ) ) { print( 'Connection failed: ' . mysqli_connect_error() ); } ... $MyConn->close(); Expected result: ---------------- Expect no output to browser/logs. Actual result: -------------- Warning: options() expects parameter 1 to be long, string given in F:\www\hillel\mysql.php on line 3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29265&edit=1

« previous php.doc (#969362167) next »