PHP Basics: Debugging Tips
Loading...
729
views
Loading...
Uploader Comments (betterphp)
see all
All Comments (12)
-
@betterphp Thanks I will check it out sometime :)
-
@betterphp why dont you edit your videos when you go over the time? I think i remember you saying that you redid one video three times because it was being too long ?
-
@RawRzCopteR I know, I panicked at the end a bit haha. Its too easy to get to 15 mins.
-
@projecttechnet You can, but its not really a good idea, because you may as well just make sure they don't happen. If you insist though, you can create a custom error handling function, have a look on php.net at the set_error_handler() function
Loading...
I watched your configuring php tutorial which showed me how to make the proper adjustments in the php.ini file. Thank you!
catherinen87 1 month ago
@catherinen87 :D np.
betterphp 1 month ago
Hi Jacek! Great video! How do you make your error messages sit at the top of your browser page and display in bold+red? My error messages intermingles with the rest of my file which I don't really like. Thanks in advance!
catherinen87 1 month ago
@catherinen87 It was at the top because it was a syntax error, any others would have been inline. To make it red you need to modify your php.ini file and set the error_prepend setting to some html to make it red. Post on the forum if you want the exact code / more info.
betterphp 1 month ago
Very useful video! If I may add, you could include an 'or' clause to the mysql calls and combine it with mysql_error() to report the error. For example mysql_query($query) or die('Could not not execute query' . mysql_error())
"or die" may also be used with mysql_connect() and mysql_select_db() among other commands.
n0dltr0n 8 months ago
@n0dltr0n The reason I did not advise this is that sometimes I have used that at the resulting broken html from the die() has actually hidden the error message.
betterphp 8 months ago