You are not logged in.
Hi,
I've installed Apache and PHP and PHP pages are not working.
I've stuck a simple file (index.php) in the apache web directory:
<?php
echo 'test';
?>
If I navigate to http://localhost I get no apache page, just a directory listing. If I click index.php, it only displays the file contents.
Error Log:
[Mon May 25 23:38:34 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon May 25 23:38:34 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon May 25 23:38:34 2009] [notice] Digest: generating secret for digest authentication ...
[Mon May 25 23:38:34 2009] [notice] Digest: done
[Mon May 25 23:38:35 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 configured -$
[Mon May 25 23:38:42 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Mon May 25 23:38:45 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
Access Log:
127.0.0.1 - - [25/May/2009:23:38:42 +1000] "GET / HTTP/1.1" 200 954
127.0.0.1 - - [25/May/2009:23:38:42 +1000] "GET /icons/blank.gif HTTP/1.1" 200 148
127.0.0.1 - - [25/May/2009:23:38:42 +1000] "GET /icons/text.gif HTTP/1.1" 200 229
127.0.0.1 - - [25/May/2009:23:38:42 +1000] "GET /icons/unknown.gif HTTP/1.1" 200 245
127.0.0.1 - - [25/May/2009:23:38:42 +1000] "GET /favicon.ico HTTP/1.1" 404 1050
127.0.0.1 - - [25/May/2009:23:38:45 +1000] "GET /favicon.ico HTTP/1.1" 404 1050
127.0.0.1 - - [25/May/2009:23:38:48 +1000] "GET /index.htm HTTP/1.1" 200 52
127.0.0.1 - - [25/May/2009:23:38:51 +1000] "GET /index.php HTTP/1.1" 200 34
127.0.0.1 - - [25/May/2009:23:45:28 +1000] "GET / HTTP/1.1" 200 559
Does this look like an issue with the Session Cache? I've never seen this error from a default Arch install.
Offline
Stupid question, but have you installed PHP and restarted apache after that?
To open your index.php by default, you need to have some apache conf line like this "DirectoryIndex index.php index.html".
To process PHP you need to have loaded the handler ("AddHandler application/x-httpd-php .php") and the php module ("LoadModule php5_module modules/libphp5.so").
Offline
Did you add in the /etc/httpd/conf/httpd.conf the line:
LoadModule php5_module modules/libphp5.so
Offline
No, I've never had to do that before- I've only ever set up LAMP servers on Debian systems (which seem to have that set up by default).
I'll check the settings as per the Wiki (duh...I should have read the Wiki before posting!).
Cheers.
Offline
Reading your server signature: "Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 configured" I'd presume PHP is either not installed or not enabled in your config. Another option may be a patch that prevents PHP from adding to the Apache signature (I think Suhosin does that).
Another thing to look at would be to have "index.php" mentioned in the DirectoryIndex option from the apache config file.
In love I believe and in Linux I trust
Offline
No, I've never had to do that before- I've only ever set up LAMP servers on Debian systems (which seem to have that set up by default).
I'll check the settings as per the Wiki (duh...I should have read the Wiki before posting!).
If you haven't followed the wiki and added the appropriate 'include' directive to httpd.conf then that will be your problem.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
If you haven't followed the wiki and added the appropriate 'include' directive to httpd.conf then that will be your problem.
That was it.
Offline