IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New How can I get PHP5 to work with Apache 2?
I'm running Kubuntu (Dapper) and I'm having a little problem getting php5 working with apache 2.

I'm trying to get them to work on my laptop so I can use the laptop as a test area for a server where the combination *is* working, and I'm a bit lost at this point. I have both php5 and apache 2 installed on the laptop.

libapache2-mod-php5 is also installed.

I've edited apache.conf to make sure index.php is listed in DirectoryIndex.

I have php-cli installed, so I can run php scripts from a terminal... but I can't run any php files that have been moved to /var/www... the browser has no idea what to do with them.

Any thoughts anyone? I'm at something of a loss.
"We are all born originals -- why is it so many of us die copies?"
- Edward Young
New Re: How can I get PHP5 to work with Apache 2?
Is the PHP5 module enabled inside the modules.conf file that should be in (I believe) /etc/apache2?
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New There isn't a modules.conf...
there are two directories, mods-available, and mods-enabled.
"We are all born originals -- why is it so many of us die copies?"
- Edward Young
New Oh, right.
modules.conf was apache1. Sorry.

So there should be a php5.load and perhaps a php5.conf inside the mods-available directory, and there should be symlinks to ../mods-available/php5.load and ../mods-available/php5.conf inside the mods-enabled directory. If the php5.load and php5.conf files exist, but the symlinks don't, then you can create them via the commands: ln -s ../mods-available/php5.load php5.load and ln -s ../mods-available/php5.conf php5.conf.

Note that I just tried this on my server, and installing the libapache2-mod-php5 package automatically created the files and symlinks for me... I don't normally use PHP myself. I believe I recall helping someone else out with this kind of problem (on his laptop), and his problems with PHP magically disappeared after a reboot.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New That seems to have worked!
Thanks!
"We are all born originals -- why is it so many of us die copies?"
- Edward Young
New There are scripts to do that for you.
a2enmod and a2dismod for modules and a2ensite and a2dissite for sites.

Wade.
"Insert crowbar. Apply force."
     How can I get PHP5 to work with Apache 2? - (cwbrenn) - (5)
         Re: How can I get PHP5 to work with Apache 2? - (Yendor) - (4)
             There isn't a modules.conf... - (cwbrenn) - (3)
                 Oh, right. - (Yendor) - (2)
                     That seems to have worked! - (cwbrenn)
                     There are scripts to do that for you. - (static)

Coffee, tea, or me?
99 ms