From owner-freebsd-questions@FreeBSD.ORG Sun Jul 5 06:34:07 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 89F591065672 for ; Sun, 5 Jul 2009 06:34:07 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 129B58FC19 for ; Sun, 5 Jul 2009 06:34:06 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: by bwz9 with SMTP id 9so618502bwz.43 for ; Sat, 04 Jul 2009 23:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=aBEvYsz1lBmrzyQ4izGs+veOLjFYPUoRokxjGq5QbUg=; b=DItBbGsBD6Qh3IDJc1FiTL7m4c+gfR1eaYhcTlw4mUOuj7M7hRcAlSbXyT8PQWYyhU 7LcC0vMWsahzMOKbOqAmRl6SYB5KL3FdMypKDp+jpvIOr/BbBkRpbXyctA9vph5oytbb /vi1oF3P5X6AOjGVkUwDg0XnmDUamgl2MgZYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=efNi4NzfmBKxWQVRCp8TU+5v5ePkmtPeiqwfsyq8jzal7szdykv9LYIKULUKBTqwru jwFoI7zR4wfLlcN5JAKj6wPYR+UvZHI2uU/xKegpch5oHHVLML+rEcBCzgYcfrbLnKME flu7hbs8+632donyn+BHV5VYuz3AjGwdbpRQc= MIME-Version: 1.0 Received: by 10.204.60.133 with SMTP id p5mr3094437bkh.143.1246775646054; Sat, 04 Jul 2009 23:34:06 -0700 (PDT) In-Reply-To: <4A4FF9D9.2010006@baywinds.org> References: <4A4F6841.3020408@intersonic.se> <4A4FB7E0.3040809@baywinds.org> <4A4FE025.5070100@intersonic.se> <4A4FF9D9.2010006@baywinds.org> Date: Sun, 5 Jul 2009 02:34:06 -0400 Message-ID: <4ad871310907042334o79824c77k7bc76930286afc86@mail.gmail.com> From: Glen Barber To: Bruce Ferrell Content-Type: text/plain; charset=ISO-8859-1 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 06:34:07 -0000 On Sat, Jul 4, 2009 at 8:54 PM, 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. > Worse yet, this doesn't have to be a PHP problem... You can create an .htaccess file containing 'FAIL' and it will generate an 500 response. -- Glen Barber