Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

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?
0
Slimshaneey
Asked:
Slimshaneey
3 Solutions
 
Fabio MarzoccaFreelancerCommented:
try from a terminal:

sudo apt-get install lamp-server^
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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
 
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

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now