php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20138 PHP 4.3.0-pre2 fails to parse .php files with Apache 2.0.43
Submitted: 2002-10-28 12:42 UTC Modified: 2002-10-28 12:56 UTC
From: avarnals at zigg dot net Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.0-pre1 OS: Linux 2.4.19
Private report: No CVE-ID: None
 [2002-10-28 12:42 UTC] avarnals at zigg dot net
This is actually about 4.3.0-pre2 ( I haven't tried pre1 ).

PHP was configured with:

--with-apxs2=/usr/local/apache2/bin/apxs --prefix=/usr/local/php --without-mysql
--with-pgsql --with-gd --with-openssl --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-bz2 -enable-ftp --enable-bcmath

(It failed to find libjpeg and libpng in /usr/lib without the relevant options above. )

I manually added:

LoadModule php4_module modules/libphp4.so

and:

AddType application/x-httpd-php .php

to httpd.conf, APXS getting the fromer wrong, though I note that 'make install' with PHP 4.2.3 and Apache 2 does do the right thing.

'make test' resulted in two failures:

FAIL OpenSSL private key functions [ext/openssl/tests/001.phpt]
FAIL Testing randomization of shuffle() and str_shuffle(). [ext/standard/tests/strings/004.phpt]

I wouldn't have thought, but don't know, that these are not relevant to my problem.

Anyway, the main problem is that .php files are not being parsed when served, my browser prompting me to save the file instead. The browser informs me that it is a file of type application/x-httpd-php, so it seems the AddType directive is working.

It looks as if Apache is loading the PHP module:

HTTP/1.1 200 OK
Date: Mon, 28 Oct 2002 18:22:51 GMT
Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6e PHP/4.3.0-pre2

and fuser reports that libphp4.so is held open by each of the Apache processes.

The Apache configuration is almost as the supplied default, but with two virtual servers enabled. I've tested without virtual servers and the same problem occurs.

PHP 4.2.3 with the same Apache configuration does work, other than the known problem of the segmentation faults on trying to make the server re-read its configuration.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-28 12:56 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Looks like a user configuration problem. I've tried pre2 just now on Apache 2.0.43 and it worked fine with both:

<Files *.php>
       SetOutputFilter PHP
       SetInputFilter PHP
</Files>

AND

AddType application/x-httpd-php .php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 07:01:31 2024 UTC