From: Operating system: Linux PHP version: 5.3.9 Package: MySQLi related Bug Type: Bug Bug description:Too many open links not reported correctly
Description: ------------ The "Too many links" error condition does not provide any error code. The only way you can get a description of the error is via the warning output. Run test script with mysqli.max_connections = 1 to see the problem. This even breaks the documentations example for mysqli_real_connect(). Test script: --------------- $link1 = mysqli_init(); $m_rc1 = mysqli_real_connect($link1, 'localhost', 'dbuser', 'dbpassword', 'testdb', 8889); echo "--- Opening second link ---\n"; $link2 = mysqli_init(); echo "mysqli_init() result : ".var_export($link2, TRUE)."\n"; echo "--- Opening second connection ---\n"; $m_rc2 = mysqli_real_connect($link2, 'localhost', 'dbuser', 'dbpassword', 'testdb', 8889); echo "mysqli_real_connect() result : ".var_export($m_rc2, TRUE)."\n"; echo "Error number: ".var_export(mysqli_connect_errno($link2), TRUE)."\n"; Expected result: ---------------- An error number returned on the last line. Actual result: -------------- Error number is 0, possibly indicating success. -- Edit bug report at https://bugs.php.net/bug.php?id=60849&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60849&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60849&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60849&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60849&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60849&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60849&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60849&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60849&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60849&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60849&r=support Expected behavior: https://bugs.php.net/fix.php?id=60849&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60849&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60849&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60849&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60849&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60849&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60849&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60849&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60849&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60849&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60849&r=mysqlcfg