> -----Original Message-----
> From: Per olof Ljungmark [mailto:p...@bsdlabs.com] 
> Sent: Sunday, July 05, 2009 2:01 AM
> To: users@httpd.apache.org
> Subject: [us...@httpd] Annoying problem with apache22 / php5 
> - how to investigate?
> 
> Hi,
> 
> We run FreeBSD 7 and apache 2.2 (currently 2.2.11) with php5 serving 
> pages from a webmail app (Horde).
> 
> Randomly (as it seems at least), there is a 500 (Internal 
> server error) 
> and a blank page is presented to the user like
> 
> [04/Jul/2009:15:19:37 +0200] "GET 
> /services/portal/sidebar.php?httpclient=1 HTTP/1.1" 500 -

500 Internal Server error means that the PHP program crashed, so not
really an apache problem. Basically, you need to find out the conditions
that make the program crash and then protect against them.

For example, if the program reads a file and the filename is derived
from the request attributes, a certain request might generate a filename
that doesn't exist - then you'll get a file-not-found condition in the
program and, if it's not trapped, it'll crash.

> 
> There are no other messages in the logs, not even with 
> LogLevel debug. 
> The problem has survived several both OS and Apache/PHP/HORDE 
> upgrades 
> and I really need to track this down now.
> 
> Question: What tools would be the best to further analyze this? The 
> standard logging does not seem to be sufficient in this case and I am 
> totally inexperienced in how to dig further down.

Read the program code and do a print for everything the program has to
use. Then think of what could go wrong (for example, never assume that
request attributes will be what you expect them to be, or even that they
will be present.)

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 



> 
> Thanks a lot!
> 
> -- 
> per
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>    "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
> 
> 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. If you receive this message in 
error, please notify the sender urgently and then immediately delete the 
message and any copies of it from your system. Please also immediately destroy 
any hardcopies of the message. 
The sender's company reserves the right to monitor all e-mail communications 
through their networks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to