From owner-freebsd-questions@FreeBSD.ORG Tue Sep 18 20:13:59 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1916A16A46B for ; Tue, 18 Sep 2007 20:13:59 +0000 (UTC) (envelope-from orders@fixer.com) Received: from fall-curlleaf.atl.sa.earthlink.net (fall-curlleaf.atl.sa.earthlink.net [207.69.195.105]) by mx1.freebsd.org (Postfix) with ESMTP id DB19513C465 for ; Tue, 18 Sep 2007 20:13:58 +0000 (UTC) (envelope-from orders@fixer.com) Received: from emory.mail.atl.earthlink.net ([207.69.200.138]) by fall-curlleaf.atl.sa.earthlink.net with esmtp (Exim 4.34) id 1IXiZL-0000KM-0P for questions@freebsd.org; Tue, 18 Sep 2007 15:17:11 -0400 Received: from dialup-4.225.208.50.dial1.denver1.level3.net ([4.225.208.50]) by emory.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1IXiZJ-0003g5-00 for questions@FreeBSD.org; Tue, 18 Sep 2007 15:17:09 -0400 Message-ID: <46F01640.9090000@fixer.com> Date: Tue, 18 Sep 2007 12:17:36 -0600 From: "orders@fixer.com" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050420 X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: php failing 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: Tue, 18 Sep 2007 20:13:59 -0000 uname -a localhost 6.2-RELEASE FreeBSD 6.2-RELEASE#0: Thu Aug 30 13:20:27 UTC 2007 root@:/usr/src/sys/i386/compile/VIL i386 I have been using apache, PHP and mysql for years with no problems. I just suffered a computer crash and my backup failed, so I had to reinstall. However, now I have a problem. I tried "pkg_add -r php5" and the latest PHP5 from www.php.net(www.php.net used to work, but that was before php5 existed). If I access phpinfo() with my browser, it fails. When I try to run a PHP script, I get the error: >cgi error: > The following CGI application misbehaved by not > returning a complete set of HTTP headers. > The headers it did not return are: > > This error message means PHP failed to output anything at all. To > get to a sensible error message, change to the PHP executable directory > and run PHP -i. If php has any problems running, then a suitgable error > message will be displayed which will give a clue as to what needs to be > done next. If you get a screen full of HTML codes, then PHP is working. > > Once PHP is working on the command line, try accessing the script once > again. If it still fails then it could be one of the following: > > *The file permissions on your script, php.ini, or any extensions you are > trying to load are such that the anonymous internet user > ISUR_ cannot access them. > *The script file does not exit (or possible isn't where you think > it is relative to your web root directory). If the script does not > exit then the server will return a 404 error instead. I didn't get the 404 error, so I think my script exits. When I typed PHP -i, I received 4 pages of HTML code. This means PHP works. I tried phpinfo() from my browser and still nothing. I have been fighting this for 3 weeks and reinstalled many times. I tried this on FreeBSD-5.4, 6.1 and 6.2. All three operating systems produce the same result. I found out that apache runs in a jail and uses chroot. I added the directory it says and still nothing. This is where I get stuck. Thanks in advance for any help. bruce