From owner-freebsd-questions@FreeBSD.ORG Sun Jul 5 08:27:52 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D910106567B for ; Sun, 5 Jul 2009 08:27:52 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id E524F8FC16 for ; Sun, 5 Jul 2009 08:27:51 +0000 (UTC) (envelope-from peo@intersonic.se) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <4A506403.60305@intersonic.se> Date: Sun, 05 Jul 2009 10:27:47 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Thunderbird 2.0.0.21 (X11/20090502) MIME-Version: 1.0 To: Bruce Ferrell References: <4A4F6841.3020408@intersonic.se> <4A4FB7E0.3040809@baywinds.org> <4A4FE025.5070100@intersonic.se> <4A4FF9D9.2010006@baywinds.org> In-Reply-To: <4A4FF9D9.2010006@baywinds.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Annoying problem with apache22 / php5 - how to investigate? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 08:27:52 -0000 Bruce Ferrell wrote: > > Per olof Ljungmark wrote: >> Bruce Ferrell wrote: >>> Per olof Ljungmark wrote: >>>> Hi, >>>> >>>> We run 7-STABLE and apache22 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 - >>>> >>>> There are no other messages in the logs, not even with LogLevel debug. >>>> The problem has survived several both OS and port upgrades and I really >>>> need to track this down now. >>>> >>>> Question: What OS tools would be the best to further analyze this? >>>> Someone with more exparience running this combo perhaps would know? >>>> >>>> Thanks a lot! >>>> >>>> -- >>>> per >>> I'd look in the Apache error_log >>> >> I've looked, as stated above. Even with LogLevel debug there is not a >> trace. Likewise, I have E_ALL set in php.ini. >> >> So, I need to dig deeper inte the workings of Apache with the aid of the >> right tools. > > > You're not looking at an Apache problem, but a PHP problem. 500 is the > error code for a failed CGI script/program. Try executing the php from > the command line. i.e. Go to where ever > /services/portal/sidebar.php is and execute: > > ./sidebar.php httpclient=1 > > See what, if any, errors are thrown that way. > > PHP is notorious for not sending good errors into the logs or to STDERR. > You're right, I will see whatever logging I can squeeze out from the script handling. It's really annoying it's an intermittent problem... Thanks!