I am working on a PHP script locally that has a bug in it somewhere.
I am developing locally using the latest version of XAMPP. Whenever the script causes an error I simply get a white blank page.
Is there a way I can get the error printed to the screen?
I have checked Apache and PHP and as far as I can see I have error reporting enabled.
When I receive the white error screen nothing is logged to the Apache or PHP log files.
Makes it very frustrating trying to debug the script.
Would it be a browser thing? I am using FireFox.
Any tips would be greatly appreciated.
Thanks
This sounds like a syntax error (e.g. missing a closing bracket). Put a print statement at the beginning of the script and make sure it’s actually running. If it’s not, go hunting for a syntax error.
Add something simple to inform you if the script is being executed like
print("Starting script example.php");You can also add this to your php.ini file to make sure that error reporting is on:
error_reporting = E_ALL