I am learning PHP using VS and am using apache server. When there is an error that I know is an error, my browser just shows a blank screen instead of describing the error. How can I set it to do so? Thanks
I have tried searching ‘error’ in settings and ensuring all of the error settings seem correct.
2
Answers
On a Mac having downloaded XAMPP:
Applications/XAMMP/xamppfiles/etc/'php.ini'
Line 471:
display_errors = On
OS Ventura 13.2
Look for your PHP installation folder should be something like this:
/bin/php/php-8.1.13-Win32-vs16-x64
When you find it, look for:
php.ini and look for this text (and set it to On):
then save the file and restart the server.
If you don’t find this file or do not want to edit it, try to add this at the top of your PHP file:
This should be enough in order to display all errors.