From:             bommar33 at msu dot edu
Operating system: Windows 2k3
PHP version:      5.0.0
PHP Bug Type:     Documentation problem
Bug description:  mysqli_options Compression Constant

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 bug report at http://bugs.php.net/?id=29265&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29265&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29265&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29265&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29265&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29265&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29265&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29265&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29265&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29265&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29265&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29265&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29265&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29265&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29265&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29265&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29265&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29265&r=float

Reply via email to