New to debian, php problems with apt-get
Yesterday I got a vps account on a remote server with a stripped down install of debian. I am pretty excited to get away from redhat (a little too ms-like in mentality), but I'm really having a hard time just getting a LAMP solution in.
Excited about apt-get resolving dependency issues I jumped in. # apt-get bind (worked great) # apt-get php5 # apt-get --purge remove php5 (decided to go with php4 instead) # apt-get php4 # apt-get apache (Hmm... installed 1.3, I was running 2 before) # apt-get --purge remove apache (Didn't seem to remove any init.d/rcX.d files.) # apt-get httpd (Uh... just going back to default) # apt-get --purge remove httpd # apt-get apache # apt-get mysql-common mysql-client mysql-server I go to domain, apache works great. # touch /var/www/test.php # echo "<?php phpinfo(); ?>" >> /var/www/test.php Open Mozilla, go to mydomain.com/test.php. Tries to download php file. Go into httpd.conf uncomment "AddType application/x-httpd-php .php" # apachectl restart Open Mozilla, go to mydomain.com/test.php, same problem. After hours of searching, re-apt-getting, and trying to manually recompile php. I am asking for help. Also, I'm wondering if I can cleanly remove all the apt-get installs I've done, that didn't help me. I have limited hard drive space. Thank you in advance |
I guess you didn't configure Apache to enable php?
|
You have to install php as a module of Apache.
|
Thanks a lot.
In case others have this problem and end up here... How to get LAMP (Linux Apache Mysql Php) going on Debian. # apt-get install apache # apt-get install php4 # apt-get install mysql-common mysql-client mysql-server # apt-get install php4-mysql # vi /etc/apache/httpd.conf Uncomment the following 2 lines: AddType application/x-httpd-php .php LoadModule php4_module /usr/lib/apache/1.3/libphp4.so Thanks again! |
Glad it's working for you now! :)
|
All times are GMT -5. The time now is 09:52 PM. |