install apache and php on ubuntu server
I have ubuntu server 6.06. I've installed apache2 with apt-get install apache2*. How can I install php on it?
|
There's an automatic LAMP (Linux, Apache, MySQL, and PHP) installer for Ubuntu Server - I think. I can't seem to find any documentation on it. You might also check out The Perfect Setup for Ubuntu Server.
|
Hi
Another way is to use dependency checking in apt-get. If you just do a apt-get install mysql-server phpmyadmin You'll get mysql-server, and since phpmyadmin requires PHP on the Apache, it will install and configure it correctly. It will also install the libraries and the mysql module for PHP because its required too. |
I just want to install PHP4 or 5 on apache2... and it doesn't seem to work with regular apt-get install comands. I have the server up... the lamp option is during the install i guess.
Please help! I really want to get this thing up and running! Thank you! |
Hi again
I think you need some package to make the php work on apache2. I think it might be "libapache2-mod-php4" or "libapache2-mod-php5". Then those packages probably need some others. But I still think the easiest way is to install phpmyadmin - after you have installed it, you can just remove it. apt-get install phpmyadmin apt-get remove phpmyadmin You wont get mysql-server that way, as it's not needed (it could be on another box), but you'll get the mysql module for apache. Just take a note of all the packages you get so you can remove what you dont think you'll need. |
nope... that doesn't work for me... if i install phpmyadmin along with libapache2-mod-php it still prompts me to download the php file rather than interpret it.
any other ideeas ? how can i configure apache to work with php on ubuntu ? |
Strange - it worked when i did it.
I dont know what could be wrong, but all the configuration files are in /etc/apache2 and /etc/apache2/README tells a bit on the files in there. You could also try to restart Apache, and then look in /var/log/apache2/error.log - there might be some clue to what the error is. |
Ubuntu have a fantastic Wiki.
All the information you will need is here: https://help.ubuntu.com/community/ApacheMySQLPHP Also replace apt-get with aptitude as it will remove any dependancies. |
Zetec,
while your link is great (thanks), this one is wrong: Quote:
Anyways, cheers & have fun |
Arh thanks for putting that right robbert. Im new to the game but like to try and help out.
Regards, Jon |
|
i have installed as LAMP. But it still doesn't work. it prompts me to download the php files. But if i install phpmyadmin it works. i guess i have to make some adjustemnts to apache2.conf. what could those be?
thankyou! |
Quote:
edit Quote:
find the Quote:
add Quote:
and of course run a /etc/init.d/apache2 restart |
:) i know how to make a directory index. the problem is that i want for example a http://localhost/test.php and it prompts me to download it.
|
assuming its stored in /var/www/
verify its set to atleast 775 (chmod 775) I've had that problem before ill look into how i fixed it. |
All times are GMT -5. The time now is 03:05 PM. |