Re: errors not showing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 19, 2012 at 11:16 PM, Tim Dunphy <bluethundr@xxxxxxxxx> wrote:
> Hello Simon,
>
>  Thanks for your response.
>
>  However I still can't seem to get errors to show up.
>
> [dunphy@localhost:~/jf-current] #cat /private/etc/php.ini | grep -e
> error_reporting -e display_errors
> ; display_errors
> ; error_reporting
> error_reporting = E_ALL & E_NOTICE
> ;error_reporting = E_ALL & ~E_DEPRECATED
> display_errors = On
> ; separately from display_errors. PHP's default behavior is to suppress those
> ; Eval the expression with current error_reporting().  Set to true if you want
> ; error_reporting(0) around the eval().
>
> [dunphy@localhost:~/jf-current] #sudo apachectl -t
> Syntax OK
>
> [dunphy@localhost:~/jf-current] #sudo apachectl restart
>
>
> [dunphy@localhost:~/jf-current] #uname -a
> Darwin localhost 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
> 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386
>
> I was wondering if there might be something else I might've missed?
>
> Thanks
> Tim
>
> On Sat, May 19, 2012 at 11:57 PM, Simon J Welsh <simon@xxxxxxxxxxx> wrote:
>> On 20/05/2012, at 3:55 PM, Tim Dunphy wrote:
>>
>>> hello, list!
>>>
>>> I have 'error_reporting = E_ALL' set in my php.ini file. However when
>>> I run a php script that has errors in it all that happens is that the
>>> page WSODs. I am running Mac OS X 10.6. Any thoughts on why errors
>>> don't show up in the browser and how to correct this?
>>>
>>>
>>> Thanks
>>> Tim
>>
>> You also need to set display_errors to On.
>> ---
>> Simon Welsh
>> Admin of http://simon.geek.nz/
>>
>
>
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Are these syntax errors or run-time errors? The former won't display
to the page at all, as they abort PHP before that point. Those written
to wherever PHP is set to log errors, which might be the same as the
apache error log unless you've set something specifically for it in
php.ini.

The best way I've found to suss out syntax errors is to "lint" the
source file with php -l from the command line.

On the other hand, if they are not syntax errors, then make sure you
set error_reporting and display_errors (I also always set
display_startup_errors as well) soon enough to catch them (and that
nothing you include turns them off).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux