From: info at markoheijnen dot com
Operating system: Debian Wheezy
PHP version: 5.5.1
Package: MySQL related
Bug Type: Bug
Bug description:Mysql_* functions hide their warning
Description:
------------
When I run mysql_query() in PHP 5.4 without having a valid connection I
will get
the warning about not having a valid connection and access to the user has
been
denied. But when I now call mysql_query() in PHP 5.5 I only get the
deprecation
message. I would expect to also see the warnings.
I only tested this with mysql_query() but I guess it will infect other
functions
that can throw warnings.
Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
mysql_query('SELECT * FROM table');
Expected result:
----------------
Deprecated: mysql_query(): The mysql extension is deprecated and will be
removed
in the future: use mysqli or PDO instead in test.php on line 4
Warning: mysql_query(): Access denied for user 'www-data'@'localhost'
(using
password: NO) in test.php on line 4
Warning: mysql_query(): A link to the server could not be established in
test.php
on line 4
Actual result:
--------------
Deprecated: mysql_query(): The mysql extension is deprecated and will be
removed
in the future: use mysqli or PDO instead in test.php on line 4
--
Edit bug report at https://bugs.php.net/bug.php?id=65397&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65397&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65397&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65397&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65397&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65397&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65397&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65397&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65397&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65397&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65397&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65397&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65397&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65397&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65397&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65397&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65397&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65397&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65397&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65397&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65397&r=mysqlcfg