On Sat, 17 May 2008 16:00:49 +0200, Michael Sharman <sh****@gmail.com>
wrote:
Hi guys,
I'm somewhat new to PHP, so please excuse what I hope is an easy
question.
I've experienced some issues lately where the code on my development
environment throws no errors, but when I upload to a shared hosting
server errors are thrown.
The latest was when I had output before calling header(); which should
normally throw an error. As mentioned above, this threw no errors on
my local machine but did only when I uploaded to another server.
This could have something to do with output buffering locally and not on
production? Or something like implicit_flush...
My setup is:
- PHP 5.2.5
- Windows XP
- Apache
The following is from my php.ini:
- display_errors:On
- error_reporting:8191
I also have error_reporting(E_ALL | E_STRICT); in my project.
Can anyone please let me know what you would run in production in
Production would be run in E_ALL, with display_errors of and log_errors to
a file of your choice.
Some starters for hunting the reason down:
1) Compare the phpinfo() output of your develelopment & production server.
Any noticable differences?
2) Are you sure this is not because differences unrelated to code
directly? (like file permissions, installed extentions, database user
permissions etc.)
3) Is the error not shown, or simple not being thrown? Trigger_error()
should tell you wether deliberate errors make it to your screen. For good
measure, add a trigger_error() just after a point your production
environment throws an error, so run-time settings are more or less as
identical as you can get them. If it's just that the error doesn't exist,
I refer you to option (2) )
4) Any particular errors / common themes about the errors thrown?
5) Is there a difference in PHP versions between development & production?
6) Any calls set_error_handler() / set_exception_handler() anywhere in the
code?
--
Rik Wasmus
....spamrun finished