Alright, so when I run a php script that has an error, I get a blank white screen. I'd like to have it tell me my errors, at least in the dev phase. I tried updating my php.ini file but the changes did take but I still get a blank white page.

I am on a Mac so I have Terminal built in, and can login to my server as root. I did vi /etc/php.ini and pulled the file up, found error_reporting = E_ALL which I assume is correct to display errors, and also display_errors = On but I still cannot see my errors. Is it that they are fatal errors and totally crash my script? The script in question is a huge if statement with tons of select and update statements, but I have pored over the code for two days and cannot find an error. Is there another way to fix my php.ini file, a function I can run at the top of my script to display errors or a 3rd party app that will parse errors out of my script?

    You may need to restart the web server for the php.ini changes to take effect.

    If that is not possible and if you are using Apache, you could put those changes into a local .htaccess file, which does not require a server restart for them to be processed.

      Okay cool, rebooting worked. Now...

      Why does this: $date = date(Ymd);

      net me this:

      Notice: Use of undefined constant Ymd - assumed 'Ymd' in /var/www/vhosts/domain.com/httpdocs/organic/addsubscriber.php on line 990

      does it require quotes?

        Yes, the 'Ymd' should be quoted, as it is a string literal.

          Write a Reply...