#31855 [Opn->Bgs]: <IfModule sapi_apache2.c> false
| From: | rasmus@php.net | Date: | Mon, 07 Feb 2005 00:04:02 +0000 |
| Subject: | #31855 [Opn->Bgs]: <IfModule sapi_apache2.c> false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73577@lists.php.net to get a copy of this message | ||
ID: 31855
Updated by: rasmus@php.net
Reported By: michael at stellarent dot com
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Fedora Core 2
PHP Version: 5.0.3
New Comment:
No, that ifModule Apache check has nothing to do with the actual
filename of the original source file for a module. It has to do with
the LoadModule line you used to load PHP. If you have:
LoadModule php5_module /some/path/libphp5.so
Then to check for the presence you use IfModule mod_php5.c. The .c
part is a bit odd, but that's just the way Apache works and has nothing
to do with PHP. You can't just make up your own thing here.
Previous Comments:
------------------------------------------------------------------------
[2005-02-07 01:01:38] michael at stellarent dot com
Below is an extract of the httpd.include which is re-written by Plesk.
The top section switches off php globally, and for each vhost,
sapi_apace2.c is used to switch php on. But since sapi_apache2.c is
evaluating to false, php remains switched off.
It would be useless for me to change the file from sapi_apache2.c to
mod_php5.c because the changes will be lost the next time a new domain
is added.
In any case, why does sapi_apache2.c evaluate to false? I don't get
it?
-------------------------------------------
<Directory "/home/httpd/vhosts">
AllowOverride All
Options SymLinksIfOwnerMatch
Order allow,deny
Allow from all
php_admin_flag engine off
</Directory>
<VirtualHost \
***ip remmed out***:80 \
>
ServerName default
UseCanonicalName Off
DocumentRoot /home/httpd/vhosts/default/htdocs
ScriptAlias /cgi-bin/ "/home/httpd/vhosts/default/cgi-bin/"
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory "/home/httpd/vhosts/default/cgi-bin/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
<Directory /home/httpd/vhosts/default/htdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir
"/home/httpd/vhosts/default/htdocs:/tmp"
</IfModule>
</Directory>
</VirtualHost>
------------------------------------------------------------------------
[2005-02-07 00:53:36] michael at stellarent dot com
Shouldn't sapi_apache2.c work? I mean valuate to true?
I am using Plesk v7.5.2 Reloaded, and every time a new domain is added,
the entire httpd.conf file is re-written. Therefore, I am unable to use
mod_php5.c.
------------------------------------------------------------------------
[2005-02-07 00:49:56] sniper@php.net
I don't know what the bug is if this works:
<IfModule mod_php5.c>
php_admin_flag engine on
</IfModule>
------------------------------------------------------------------------
[2005-02-05 21:42:01] michael at stellarent dot com
I am using httpd-2.0.51-2.9
------------------------------------------------------------------------
[2005-02-05 21:39:19] michael at stellarent dot com
Description:
------------
Hi,
This does not work:
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
My compilation is fine, no errors, and I know php works. This for
instance works:
<IfModule mod_php5.c>
php_admin_flag engine on
</IfModule>
I am compiling from .src.rpm, with:
--with-apxs2=/usr/sbin/apxs
I have tried everything I could think of, but still no joy. Any ideas?
Expected result:
----------------
my php script to be executed.
Actual result:
--------------
the php script is not executed, instead I get the "Save File..."
dialogue box.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31855&edit=1