PHP not interpreted by Apache in Red Hat linux enterprise 4
I want to have a LAMP Server.I have installed all the three rpms of Apache, MySql and PHP.
The Apache server can be accessed. files with .html extensions can be interpreted but with .php it is doing nothing. Can any body help me. |
Edit httpd.conf to have :
Code:
DirectoryIndex index.html index.php Do the same for mod_php.conf so you have uncommented: Code:
AddType application/x-httpd-php .php |
sohail
Quote:
But there is no mod_php.conf in /etc/httpd. Where should I include it. The other two lines mentioned by you have already been added to httpd.conf but still it is not working. |
mod_php.conf could be elsewhere, or still to be created from the template mod_php.conf.example. To find out do this as root:
Code:
updatedb Code:
locate mod_php.conf |
sohail
Quote:
The output from error_log of httpd is as under: [Sat Jan 31 00:02:13 2009] [error] [client ::1] File does not exist: /var/www/html/favicon.ico [client ::1] PHP Warning: Unknown(/var/www/html/phpinfo.php): failed to open stream: Permission denied in Unknown on line 0 [client ::1] PHP Warning: (null)(): Failed opening '/var/www/html/phpinfo.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0 |
Something should be wrong with your Apache installation. Save following line:
Code:
AddType application/x-httpd-php .php |
Did you add the LoadModule php5_module 'path to module' to you httpd.conf file.
|
Code:
[client ::1] PHP Warning: Unknown(/var/www/html/phpinfo.php): failed to open stream: Permission denied in Unknown on line 0 Sohailkmu, does the user that apache runs under have permissions to the /var/www/html folder? I's usually www-data unless you changed it in the envvars file. |
Quote:
There was a problem with the permissions. The problem has been solved. thank you once again |
All times are GMT -5. The time now is 03:08 AM. |