I need to show in the browser, as much errors and code suggestions as possible.
So I modified my php.ini like so:

318 error_reporting = E_ALL & E_STRICT
338 display_errors = On
339 display_startup_errors = On
344 log_errors = Off

However, nothing is showing.
What am I doing wrong?

    I don't recall what the setting is, but I seem to remember there is an error-related setting for logging which might cause all errors to end up in a log file rather than being echoed to the browser.

      sneakyimp wrote:

      there is an error-related setting for logging which might cause all errors to end up in a log file rather than being echoed to the browser.

      That'd be [man]log_errors[/man], but it won't override the value of display_errors - you can have both enabled simultaneously.

      @: If laserlight's reminder isn't the solution, try doing a [man]phpinfo/man and see if a) your new values are being reflected, and b) which php.ini configuration file PHP claims to be loading (perhaps you're editing the wrong file, or PHP never found your php.ini file to begin with).

        Thanks for all answers.
        Completely baffled, because I did a phpinfo in order to find the correct file and...after restarting server, phpinfo shows this:
        display_errors On On
        display_startup_errors On On
        More info:
        Loaded Configuration File /etc/php5/apache2/php.ini
        That's the one I edited.
        If I load a local file with values for:
        // display errors in browser

        //@ini_set("display_errors", true);

        // report ALL errors, warnings and info messages (that might be a lot)

        //error_reporting(E_ALL);

        it works! but only for that site
        The server is an Ubuntu LAMP with
        PHP Version 5.2.10-2ubuntu6.4
        I am going to remove E_STRICT and leave only E_ALL in there.
        I'll give it another spin after that because this is not making sense to me.

          Try this instead:

          error_reporting = E_ALL | E_STRICT

          E_ALL & E_STRICT should actually equate to 0, or no errors displayed. The '&' means you're wanting the intersection of the two, and since E_STRICT isn't part of E_ALL, the two don't intersect.

            Thanks for quick reply.
            I already restarted computer with only E_ALL in error_reporting.
            Got same values in php.ini, still nothing shows in browser.
            Here is some more info:
            error_append_string no value no value
            error_log no value no value
            error_prepend_string no value no value
            error_reporting 6143 6143

            Will try again with your syntax in there, and report here.

              So restarted computer after changes in php.ini and no luck.
              However, I uncommented those two lines in the local file and the errors are there!
              Maybe a permission issue?
              /etc belongs to root, while /var/www belongs to me.
              I chowned so I don't have to login as root.
              Obviously, I am using Linux.
              Please find attached my php.ini file.

                7 days later

                Nobody answered my last post, so I'm gonna bump it up a little.
                It might be a permissions or ownership issue.
                Please find attached the perms and ownership for the php.ini file.
                Regarding the var/www it is set to owner ckosloff:root.
                I can of course change the perms and ownership for php.ini but am unsure how to set them.
                Any suggestions?
                Thanks in advance.

                  There's also a value for display_errors in the PHP.ini file. This tells PHP whether to display errors to the browser. If it's OFF, then the errors are probably being written to a log file somewhere.

                  Once you make changes to the PHP.ini file, Apache must be restarted (restarting the whole computer should accomplish the same thing). Once it's restarted, you should probably check [man]phpinfo[/man] to make sure your changes have taken effect.

                    Thanks for reply, but, sorry to say, all these issues have been addressed previously.
                    My php.ini file is attached, you are welcome to take a look, display_errors is set to true.
                    My computer/server has been restarted several times since then.
                    I also mentioned that phpinfo shows the setting as on.
                    I still think it is a permission/ownership problem, any help with that?

                      Are you sure that the PHP.ini you edited is the one actually used by the instance of php running on your server?

                      Also, in the php.ini you posted, you have display_errors set to "true". Try "On" instead.

                        Sorry to say, we have been through that in this same post already.
                        Yes, that is the php.ini file that is loaded.
                        Also, phpinfo shows display_errors as On, so it really does not matter if it is set to true or On.
                        The php.ini file says that you can use either one, and, besides, I did try both settings without any change.
                        Thanks anyway.

                          Sorry I couldn't help. Perhaps you should try 'on' for display_errors anyway just in case.

                          Also, perhaps you may have some apache hosts files or htaccess files over-riding your php.ini settings. maybe try removing the .htaccess files?

                            This is a local server, no .htaccess files.
                            display_errors is already on, as I said before it shows on in phpinfo() and I have already tried your suggestion.
                            Will try posting in a Linux forum, or in Ubuntu forums, I cannot make sense of what is going on.

                              Write a Reply...