You are not logged in.

#1 2009-11-05 22:04:28

rrdonn
Member
Registered: 2009-11-05
Posts: 2

Can't get apache + php5 working right

I was following the LAMP tutorial, but PHP doesn't seem to work.

This is off of a fresh arch install.

Did the following:

pacman -S apache php php-apache

I then add 'LoadModule php5_module modules/libphp5.so' to httpd.conf and restart the server

If I navigate to the server, I see "Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8k DAV/2 PHP/5.3.0 with Suhosin-Patch Server" at the bottom. Seems like PHP is there and working.

I then create a test file phpinfo.php with the following: <?php phpinfo(); ?>

If I try to load that file, it displays its contents.

If I add 'AddType application/x-httpd-php .php' to httpd.conf, nothing changes. Should be working according to the wiki article. I'm so confused. sad

Offline

#2 2009-11-05 22:09:05

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Can't get apache + php5 working right

Besides the LoadModule directive, you also need:

Include conf/extra/php5_module.conf

Offline

#3 2009-11-05 22:13:05

rrdonn
Member
Registered: 2009-11-05
Posts: 2

Re: Can't get apache + php5 working right

Oh!

This wasn't in the wiki. The wiki says:

Include /etc/httpd/conf/extra/php5_module.conf

But your's works. I just tried your's, restarted the server and it worked. Then I put the one above back in...restarted the server, it didn't work. Then your's again..worked. Weird. But thanks!

Offline

#4 2009-11-06 00:49:47

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Can't get apache + php5 working right

That is weird indeed. Actually, both paths should work as the Include directive accepts both absolute and relative (to ServerRoot) paths.

I'm baffled as well. tongue

Offline

Board footer

Powered by FluxBB