Cant get PHP files in Apache2 to run, get download page.

Hi there, been having some problems with a new install of Ubuntu 8.10 server. Basically, It was running but wouldnt report any error messages, just showing me blank pages, however simple pages without errors ran fine. So I tried uninstalling and reinstalling Apache and PHP5 and now when I run a php file i get the file download dialog in the browser. Ive tried adding the application mime type in apache2.conf but doesnt seem to want to work. Any ideas?
LVL 11
SlimshaneeyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fabio MarzoccaFreelancerCommented:
try from a terminal:

sudo apt-get install lamp-server^
0
Michael WorshamInfrastructure / Solutions ArchitectCommented:
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

SlimshaneeyAuthor Commented:
Followed those, still getting the download pop up. Have been completely uninstalling before each try and still not working.
0
Fabio MarzoccaFreelancerCommented:
You need to clean up your system and install a lamp-server as per ubuntu standard procedure:

sudo apt-get install lamp-server^

This will provide all configurations needed.
0
SlimshaneeyAuthor Commented:
tried sudo apt-get install lamp-server^,
Didnt work :-(
0
Fabio MarzoccaFreelancerCommented:
Can't help.
On a clean system, that command installs and configures a perfect lamp server. It is easier to clean your system and reinstall it, than trying to trick the whole configuration.
0
SlimshaneeyAuthor Commented:
How do I "clean my system"?
0
Fabio MarzoccaFreelancerCommented:
sudo apt-get purge apache2
sudo apt-get purge php5
sudo apt-get purge mysql-server
sudo apt-get autoremove --purge
sudo apt-get install lamp-server^
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SlimshaneeyAuthor Commented:
Still didnt work... :-(
0
SlimshaneeyAuthor Commented:
OK, got it working. Here is what I did.

sudo aptitude purge apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

This got rid of everything related to the lamp stack off the box.

Then I ran

sudo apt-get autoremove --purge

to get rid of any left overs or orphaned dependencies.

Then I ran

sudo apt-get install lamp-server^

Works fine now lol

Many thanks for the help though. If no one has any objections I will share out the points, majority to fmarzocca for help and patience?
0
Fabio MarzoccaFreelancerCommented:
Glad to read you have fixed! That was exactly what I was meaning with my post ID: 24754080
      
0
SlimshaneeyAuthor Commented:
Many thanks for your help and patience guys!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.