ID:               29265
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to