Apache Server configuration support - apache not processing php pages on gentoo

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2006 > apache not processing php pages on gentoo





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author apache not processing php pages on gentoo
Wizumwalt@gmail.com

2006-01-23, 8:49 pm

Hey all,

I have an apache 2.0.55 w/ php 4.4 on gentoo. When I go to my url, all
it shows is a directory listing so I don't think I have php properly
installed because it doesn't seem to be processing my php pages.

In my /etc/apache2/httpd.conf file I have a line ...

Include /etc/apache2/modules.d/*.conf

and I have an /etc/apach2/modules.d/70_mod_php.conf file which
contains ...
-----
<IfDefine PHP4>

# Load the module first
<IfModule !sapi_apache2.c>
LoadModule php4_module modules/libphp4.so
</IfModule>

# Set it to handle the files
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
</IfModule>

AddDirectoryIndex index.php index.phtml
</IfDefine>

-----

I also did an emerge on apache, php, mod_php. Anyone have an idea what
might be wrong?

mikedawg@gmail.com

2006-01-24, 9:10 pm

You're saying two different things here. Is it not processing php, and
showing you the source of the php file, or is it showing a directory
listing of files in the directory? If it is the first, the first thing
to check is file permissions. If it is the latter, then do you have a
index.php or an index.phtml page in the directory root?

mikedawg@gmail.com

2006-01-24, 9:10 pm

Do you have an index.php or an index.phtml page in your directory?

Wizumwalt@gmail.com

2006-01-24, 9:10 pm

Yes, as it says, it's not processing php and it is showing the
directory listing. I have an index.php in my apache's htdocs dir. But
when I put the url in firefox, apache just shows a directory listing of
what's there and doesn't process the index.php page.

mikedawg@gmail.com

2006-01-30, 8:44 am

record the current permissions on the directory and the files contained
in that directory, and do a *temporary* `chmod -R wwwuser:wwwgroup
htdocs/`

Change wwwuser to the user that httpd is running as, and change
wwwgroup to the group httpd is running as. then try and open the page
and see what happens.

Wizumwalt@gmail.com

2006-01-30, 8:44 am

When I run apache, I start it as root and it's run as the user
'apache'. I have a user and group apache in my httpd.conf file.

The /var/www/localhost/htdocs dir has read permissions for everyone all
the way down.

To simplify things, I put an index.php script in my toplevel dir of
htdocs w/ the following in the body ...

<?php echo '<p>Hello World</p>'; ?>

.... and I get a dialog in my browser titled "Opening index.php", and it
asked with what program I want to open the file.

fwbieser

2006-02-18, 2:16 pm

quote:
Originally posted by Wizumwalt@gmail.com
When I run apache, I start it as root and it's run as the user
'apache'. I have a user and group apache in my httpd.conf file.

The /var/www/localhost/htdocs dir has read permissions for everyone all
the way down.

To simplify things, I put an index.php script in my toplevel dir of
htdocs w/ the following in the body ...

<?php echo '<p>Hello World</p>'; ?>

..... and I get a dialog in my browser titled "Opening index.php", and it
asked with what program I want to open the file.



I am seeing exactly the same thing. All seems to be where it is suppose to be, but it seems like apache is not processing the php. HELP!!!!
fwbieser

2006-02-18, 11:17 pm

quote:
Originally posted by fwbieser
I am seeing exactly the same thing. All seems to be where it is suppose to be, but it seems like apache is not processing the php. HELP!!!!


I finally realized I lost my "-D PHP4" entry in the /etc/conf.d/apache2 file's APACHE_OPTS variable.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com