I’m new at this - working through PHP concepts. I forced an error condition in a php file to test error messages. I get my conditional message that the browser was “unable to connect to the database server.” but I can’t get the verbose PHP warning message.
I have edited the php.ini file so that
display_errors = On
and
display_startup_errors = On
(not sure if that’s necessary).
-Restarted MySQL server
-I’m on a Mac (snow leopard)
Thanks Mittineague - I tried setting the value to true and didn’t get the error to display. I suspect I’m missing something basic, possibly a bad path command - I’m not sure where to look yet.
Are you sure what you’ve done will really generate a php error?
Make sure your settings are applied. Test in the script via ini_get() or phpinfo(). You may have edited the wrong php.ini file
Make sure you have an appropriate error_reporting level. For example, E_ALL | E_STRICT
It’s been a while, and I was thinking the PHP error messages were the same as the MySQL error messages, but maybe not. You mentioned “verbose” error messages. Did you try
a_mysql_function_call() or die ('<p>Query Error : ' . mysql_error() . '</p>');
No. We should have noticed that you had said “Restarted MySQL server”. Generally, making a change in php.ini requires restarting the web server for it to take effect. You’re probably using apache as a web server.
I imagine there are files named something like start.exe, restart.exe and stop.exe
If you are starting things up by directly opening and executing those files, do the same for the “restart” one. If you are running through some sort of GUI look for the appropriate command. In any case the documentation for your setup - look for a readme and read it - should tell you what you need to know.