Clarding Posted October 6, 2013 Share Posted October 6, 2013 I recently upgraded to 5.5.3 and I read that mysql_ functions are deprecated, which is great and I would like to ensure a warning is seen when mysql_ functions are used. So I set my error reporting ON and still any use of mysql_ functions does not result in a deprecation warning. Do I need to change something other than doing this: error_reporting(E_ALL);ini_set('display_errors', 1); Or, why does calling a mysql_ function not result in a deprecation warning? phpinfo() tells me I am on php 5.5.3 Quote Link to comment Share on other sites More sharing options...
Solution mac_gyver Posted October 6, 2013 Solution Share Posted October 6, 2013 this is from the 5.5.0 change log - mysql: This extension is now deprecated, and deprecation warnings will be generated when connections are established to databases via mysql_connect(), mysql_pconnect(), or through implicit connection: are you setting the error_reporting/display_errors before you are making the connection? Quote Link to comment Share on other sites More sharing options...
Clarding Posted October 6, 2013 Author Share Posted October 6, 2013 Thanks mac_gyver, I hadn't spotted that! The file that set the error reporting occurred just after the database connection, so you are spot on with that. Moved the error reporting up a couple of lines, and the deprecation warning now comes up just as expected. Very many thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.