From owner-freebsd-questions@FreeBSD.ORG Wed Dec 20 14:33:34 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71ED116A415 for ; Wed, 20 Dec 2006 14:33:34 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id B15E343CA9 for ; Wed, 20 Dec 2006 14:32:56 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with SMTP id BAA14161; Thu, 21 Dec 2006 01:31:21 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 21 Dec 2006 01:31:20 +1100 (EST) From: Ian Smith To: Thomas Wahyudi In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: questions@freebsd.org Subject: PHP 5 with Apache 1.3 [reprise] 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: Wed, 20 Dec 2006 14:33:34 -0000 Sorry to follow up on my own message, but it's all still true, and I should report having found not a solution but at least a workaround .. On Tue, 19 Dec 2006, Ian Smith wrote: > On Mon, 18 Dec 2006, Thomas Wahyudi wrote: > > > Ian Smith wrote: > > > Hi all, > > > > > > bit of a long saga, and a (by now) humble question .. [..] > > > What do I need to do to get Apache to execute mod_php5 on .php files? > > > > > > Cheers, Ian > > > > > have you check output from /var/log/httpd-error.log ? it should type > > some php version if the php is working correctly or > > could you paste here the log from /var/log/httpd-error.log after you > > restart the apache ( assuming you install apache from port too ) > > Thanks Thomas, > > [Tue Dec 19 01:25:42 2006] [notice] Apache/1.3.37 (Unix) PHP/5.2.0 with > Suhosin-Patch configured -- resuming normal operations > [Tue Dec 19 01:25:42 2006] [notice] Accept mutex: flock (Default: flock) > > No, I'd installed apache-1.3.37_1 from the package, but that's not the > problem. No errors at all appear in httpd-error.log since the build. > > I've just now tried what should have been step #1, a /phpinfo.php page: > > which works just fine, so now I can concentrate on finding out what's > wrong with my phpMyAdmin config .. maybe some cruft from earlier. Further, .php scripts consisting only of the phpinfo() above, work fine anywhere under docroot, and if called index.php, work for any directory under docroot - but not in the phpmyadmin directory, unless referenced directly eg http://localhost/mypmyadmin/index.php - which works fine. Once so launched, phpmyadmin is working great, and I can get back to work on several overdue tasks, which was the point of the exercise. However, I'm still bemused as to why this is happening: > The weird thing is that fetching /localhost/phpmyadmin/ Mozilla offers, > as mentioned, to save the file "" of type application/x-httpd-php, but > whether I cancel or go ahead and save the file under the chosen random > name - which works fine and is identical to /phpmyadmin/index.php - > absolutely NOTHING gets logged to httpd-access.log, either way .. ? I turned logging on and up on php and apache. Still the above fetches deliver the raw index.php file to save, but still log NOTHING nowhere(?) So here's what's in httpd.conf possibly (I think) related to this: #LoadModule php4_module libexec/apache/libphp4.so LoadModule php5_module libexec/apache/libphp5.so [..] #AddModule mod_php4.c AddModule mod_php5.c ServerName 127.0.0.1 DocumentRoot "/usr/local/www/data" DirectoryIndex index.php index.html #% chasing php weirdness, normally LogLevel warn LogLevel info [..] Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/" Options Indexes FollowSymlinks AllowOverride None Order allow,deny Allow from all [..] #% 17/12/6 for php5 .. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps [..] Everthing else is pretty standard, and as it's been for ages, as was the above, updated from php4 to php5 after building php5 for mod_php5.so. Permissions are standard: directories 755, files 644, owner root:wheel Anyway, http://localhost/phpmyadmin/ always fails as above, while http://localhost/phpmyadmin/index.php works fine, so I'll just have to leave it at that for now .. it's still strange though .. Cheers, Ian