You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Xavier Lopez <za...@gmail.com> on 2011/06/09 23:48:20 UTC
[users@httpd] PHP Not Working
Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
enabled. It is. I'm using virtual hosts. It serves all html files,
but not php. Following is my VHost configuration:
<VirtualHost *:80>
ServerName http://new.dev
ServerAdmin webmaster@localhost
DocumentRoot /home/zave/Public/new
RewriteEngine off
<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
</Location>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/zave/Public/new>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
All my VHosts are configured the same way, save for the ServerName and
DocumentRoot directives. Please help.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RE: [users@httpd] PHP Not Working
Posted by za...@gmail.com.
Steve, I get the Firefox alert asking me what program I want it to use to
open the file.
On , Steve Brereton <th...@hotmail.com> wrote:
> What happens when you load a php page?
> A blank? the php script shows? a 500 error?
> > Date: Thu, 9 Jun 2011 14:48:20 -0700
> > From: zavelopez@gmail.com
> > To: users@httpd.apache.org
> > Subject: [users@httpd] PHP Not Working
> >
> > Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
> > enabled. It is. I'm using virtual hosts. It serves all html files,
> > but not php. Following is my VHost configuration:
> >
> >
> > ServerName http://new.dev
> > ServerAdmin webmaster@localhost
> > DocumentRoot /home/zave/Public/new
> > RewriteEngine off
> >
> >
> > RewriteEngine on
> > RewriteCond %{REQUEST_FILENAME} !-f
> > RewriteCond %{REQUEST_FILENAME} !-d
> > RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
> >
> >
> >
> > Options FollowSymLinks
> > AllowOverride None
> >
> >
> >
> > Options Indexes FollowSymLinks MultiViews
> > AllowOverride All
> > Order allow,deny
> > allow from all
> >
> >
> > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> >
> > AllowOverride None
> > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> > Order allow,deny
> > Allow from all
> >
> >
> > ErrorLog /var/log/apache2/error.log
> >
> > # Possible values include: debug, info, notice, warn, error, crit,
> > # alert, emerg.
> > LogLevel warn
> >
> > CustomLog /var/log/apache2/access.log combined
> >
> > Alias /doc/ "/usr/share/doc/"
> >
> > Options Indexes MultiViews FollowSymLinks
> > AllowOverride None
> > Order deny,allow
> > Deny from all
> > Allow from 127.0.0.0/255.0.0.0 ::1/128
> >
> >
> >
> > All my VHosts are configured the same way, save for the ServerName and
> > DocumentRoot directives. Please help.
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> Project.
> > See http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
RE: [users@httpd] PHP Not Working
Posted by Steve Brereton <th...@hotmail.com>.
What happens when you load a php page?
A blank? the php script shows? a 500 error?
> Date: Thu, 9 Jun 2011 14:48:20 -0700
> From: zavelopez@gmail.com
> To: users@httpd.apache.org
> Subject: [users@httpd] PHP Not Working
>
> Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
> enabled. It is. I'm using virtual hosts. It serves all html files,
> but not php. Following is my VHost configuration:
>
> <VirtualHost *:80>
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
>
> <Location />
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
> </Location>
>
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
>
> <Directory /home/zave/Public/new>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
> </VirtualHost>
>
> All my VHosts are configured the same way, save for the ServerName and
> DocumentRoot directives. Please help.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
Re: [users@httpd] PHP Not Working
Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/15/2011 10:23 PM, Matus UHLAR - fantomas wrote:
>>> On 10.06.11 00:03, Jeroen Geilman wrote:
>>>> You need to tell apache what to do with .php files.
>>>>
>>>> This can be implemented - as documented - by adding
>>>>
>>>> <FilesMatch \.php$>
>>>> SetHandler application/x-httpd-php
>>>> </FilesMatch>
>>>>
>>>> in your Documentroot Directory block.
>> On 06/15/2011 10:13 PM, Matus UHLAR - fantomas wrote:
>>> Since when they recomment something different than AddHandler?
> On 15.06.11 22:17, Jeroen Geilman wrote:
>> Who are "they" ?
> the PHP people apparently...
>
>> The above is the recommended way on the apache httpd wiki:
>> http://www.php.net/manual/en/install.unix.apache2.php
> Aha, I see:
>
> "Instead of only using the Apache AddType directive, we want to avoid
> potentially dangerous uploads and created files such as exploit.php.jpg from
> being executed as PHP."
>
>> We also unerringly advise it on freenode's #httpd channel.
> Who are "we"? ;)
...the regulars on the freenode #httpd channel, obviously.
--
J.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Not Working
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>> On 10.06.11 00:03, Jeroen Geilman wrote:
>>> You need to tell apache what to do with .php files.
>>>
>>> This can be implemented - as documented - by adding
>>>
>>> <FilesMatch \.php$>
>>> SetHandler application/x-httpd-php
>>> </FilesMatch>
>>>
>>> in your Documentroot Directory block.
> On 06/15/2011 10:13 PM, Matus UHLAR - fantomas wrote:
>> Since when they recomment something different than AddHandler?
On 15.06.11 22:17, Jeroen Geilman wrote:
> Who are "they" ?
the PHP people apparently...
> The above is the recommended way on the apache httpd wiki:
> http://www.php.net/manual/en/install.unix.apache2.php
Aha, I see:
"Instead of only using the Apache AddType directive, we want to avoid
potentially dangerous uploads and created files such as exploit.php.jpg from
being executed as PHP."
> We also unerringly advise it on freenode's #httpd channel.
Who are "we"? ;)
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux is like a teepee: no Windows, no Gates and an apache inside...
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Not Working
Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/15/2011 10:13 PM, Matus UHLAR - fantomas wrote:
> On 10.06.11 00:03, Jeroen Geilman wrote:
>> You need to tell apache what to do with .php files.
>>
>> This can be implemented - as documented - by adding
>>
>> <FilesMatch \.php$>
>> SetHandler application/x-httpd-php
>> </FilesMatch>
>>
>> in your Documentroot Directory block.
> Since when they recomment something different than AddHandler?
>
Who are "they" ?
The above is the recommended way on the apache httpd wiki:
http://www.php.net/manual/en/install.unix.apache2.php
We also unerringly advise it on freenode's #httpd channel.
It works.
--
J.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Not Working
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 10.06.11 00:03, Jeroen Geilman wrote:
> You need to tell apache what to do with .php files.
>
> This can be implemented - as documented - by adding
>
> <FilesMatch \.php$>
> SetHandler application/x-httpd-php
> </FilesMatch>
>
> in your Documentroot Directory block.
Since when they recomment something different than AddHandler?
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The 3 biggets disasters: Hiroshima 45, Tschernobyl 86, Windows 95
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Re: Re: [users@httpd] PHP Not Working
Posted by za...@gmail.com.
But when I do that, it says it's already enabled.
On , Yehuda Katz <ye...@ymkatz.net> wrote:
> On Mon, Jun 13, 2011 at 11:49 PM, zavelopez@gmail.com> wrote:
> Hello and thank you again for your replies thus far. I am still trying to
> get apache to parse php. I ran apache2ctl -L and I don't see php as an
> available module, yet when I do ls /etc/apache2/mods-available, I see the
> php5.conf and php5.load files. Does this information shed any light on my
> dis-configuration?
> mods-available is for any module which you have binaries on your server.
> You need to enable the module using a2enmod php5 which links it to the
> mods-enabled directory.
> You could also manually create the necessary symlinks, but I recommend
> using the script that will do it for you.
> - Yehuda
Re: Re: [users@httpd] PHP Not Working
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Mon, Jun 13, 2011 at 11:49 PM, <za...@gmail.com> wrote:
> Hello and thank you again for your replies thus far. I am still trying to
> get apache to parse php. I ran apache2ctl -L and I don't see php as an
> available module, yet when I do ls /etc/apache2/mods-available, I see the
> php5.conf and php5.load files. Does this information shed any light on my
> dis-configuration?
mods-available is for any module which you have binaries on your server.
You need to enable the module using a2enmod php5 which links it to the
mods-enabled directory.
You could also manually create the necessary symlinks, but I recommend using
the script that will do it for you.
- Yehuda
Re: Re: [users@httpd] PHP Not Working
Posted by za...@gmail.com.
Hello and thank you again for your replies thus far. I am still trying to
get apache to parse php. I ran apache2ctl -L and I don't see php as an
available module, yet when I do ls /etc/apache2/mods-available, I see the
php5.conf and php5.load files. Does this information shed any light on my
dis-configuration?
On , Jeroen Geilman <je...@adaptr.nl> wrote:
> On 06/10/2011 08:31 PM, zavelopez@gmail.com wrote:
> J, I couldn't figure out what exactly you meant when you typed "in your
> Documentroot Directory". Did you mean in the block of text that contains
> the DocumentRoot Directive, or the Directory Directive containing the
> document root? I tried it both ways, like so:
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
> SetHandler application/x-httpd-php
> AND:
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> SetHandler application/x-httpd-php
> Both are valid, but the former means you allow PHP processing anywhere,
> while the latter restricts it to your web content location.
> After restarting Apache, neither made any difference. Am I doing it
> incorrectly?
> You'd have to show concrete evidence of this.
> Run httpd -L to verify the php module is loaded.
> Clear the browser cache.
> --
> J.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Not Working
Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/10/2011 08:31 PM, zavelopez@gmail.com wrote:
> J, I couldn't figure out what exactly you meant when you typed "in
> your Documentroot Directory". Did you mean in the block of text that
> contains the DocumentRoot Directive, or the Directory Directive
> containing the document root? I tried it both ways, like so:
>
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
> <FilesMatch \.php$>
> SetHandler application/x-httpd-php
> </FilesMatch>
>
> AND:
>
> <Directory /home/zave/Public/new>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> <FilesMatch \.php$>
> SetHandler application/x-httpd-php
> </FilesMatch>
> </Directory>
>
Both are valid, but the former means you allow PHP processing anywhere,
while the latter restricts it to your web content location.
> After restarting Apache, neither made any difference. Am I doing it
> incorrectly?
You'd have to show concrete evidence of this.
Run httpd -L to verify the php module is loaded.
Clear the browser cache.
--
J.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Re: [users@httpd] PHP Not Working
Posted by za...@gmail.com.
J, I couldn't figure out what exactly you meant when you typed "in your
Documentroot Directory". Did you mean in the block of text that contains
the DocumentRoot Directive, or the Directory Directive containing the
document root? I tried it both ways, like so:
ServerName http://new.dev
ServerAdmin webmaster@localhost
DocumentRoot /home/zave/Public/new
RewriteEngine off
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
AND:
<Directory /home/zave/Public/new>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
</Directory>
After restarting Apache, neither made any difference. Am I doing it
incorrectly?
On , Jeroen Geilman <je...@adaptr.nl> wrote:
> On 06/09/2011 11:48 PM, Xavier Lopez wrote:
> Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
> enabled. It is. I'm using virtual hosts. It serves all html files,
> but not php. Following is my VHost configuration:
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
> Options FollowSymLinks
> AllowOverride None
> You are allowing apache full access to your OS root directory.
> Don't do that.
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> ErrorLog /var/log/apache2/error.log
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
> CustomLog /var/log/apache2/access.log combined
> Alias /doc/ "/usr/share/doc/"
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> All my VHosts are configured the same way, save for the ServerName and
> DocumentRoot directives. Please help.
> I see nothing related to handling PHP.
> You need to tell apache what to do with .php files.
> This can be implemented - as documented - by adding
> SetHandler application/x-httpd-php
> in your Documentroot Directory block.
> --
> J.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
Re: Re: [users@httpd] PHP Not Working
Posted by za...@gmail.com.
J, regarding your statement, "You are allowing apache full access to your
OS root directory.
Don't do that." I have a follow up question (or several hundred). I looked
into the output of phpinfo() and saw that the pwd in the 'Environment'
category = /. Which specifically confirms your point, if I'm not mistaken?
So I changed the DocumentRoot Directive in the VHost config
from '/home/zave/Public/new', to '/new', but then the server tells me that
that directory 'doesn't exist.' What am I doing wrong?
On , Jeroen Geilman <je...@adaptr.nl> wrote:
> On 06/09/2011 11:48 PM, Xavier Lopez wrote:
> Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
> enabled. It is. I'm using virtual hosts. It serves all html files,
> but not php. Following is my VHost configuration:
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
> Options FollowSymLinks
> AllowOverride None
> You are allowing apache full access to your OS root directory.
> Don't do that.
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> ErrorLog /var/log/apache2/error.log
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
> CustomLog /var/log/apache2/access.log combined
> Alias /doc/ "/usr/share/doc/"
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> All my VHosts are configured the same way, save for the ServerName and
> DocumentRoot directives. Please help.
> I see nothing related to handling PHP.
> You need to tell apache what to do with .php files.
> This can be implemented - as documented - by adding
> SetHandler application/x-httpd-php
> in your Documentroot Directory block.
> --
> J.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Not Working
Posted by Jeroen Geilman <je...@adaptr.nl>.
On 06/09/2011 11:48 PM, Xavier Lopez wrote:
> Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is
> enabled. It is. I'm using virtual hosts. It serves all html files,
> but not php. Following is my VHost configuration:
>
> <VirtualHost *:80>
> ServerName http://new.dev
> ServerAdmin webmaster@localhost
> DocumentRoot /home/zave/Public/new
> RewriteEngine off
>
> <Location />
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
> </Location>
>
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
You are allowing apache full access to your OS root directory.
Don't do that.
> <Directory /home/zave/Public/new>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
> </VirtualHost>
>
> All my VHosts are configured the same way, save for the ServerName and
> DocumentRoot directives. Please help.
>
I see nothing related to handling PHP.
You need to tell apache what to do with .php files.
This can be implemented - as documented - by adding
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
in your Documentroot Directory block.
--
J.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: PHP Not Working
Posted by DW <xf...@hotmail.com>.
Xavier Lopez wrote:
> It serves all html files, but not php.
Have you got something loike this in your configurations:
<IfModule dir_module>
DirectoryIndex index.php index.pl index.cgi index.asp index.shtml
index.html index.htm \
default.php default.pl default.cgi default.asp
default.shtml default.html default.htm \
home.php home.pl home.cgi home.asp home.shtml
home.html home.htm
</IfModule>
The above looks for php first then pl then etc etc.
Worth a try. It works on mine [2.2.19]
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org