2

I have set a local website from following here,

I have followed everything as it is but when I access my site via Mozilla Browser, it asks me where to download and save instead of displaying the index.php

Any solution?

  • Have you installed both Apache & php?? Remember, php doesn't come packed with apache.. by looking at your question, it seems you don't have `php installed. Can you kindly add more in-detail as to what you've done so far. This will help me to assist you better. :) – AzkerM Apr 14 '14 at 14:51
  • Ohhh man! I actually installed OpenStack and it installed Apache and mySQL but not PHP. I now installed and it is working. Thanks a lot – Umair Ayub Apr 14 '14 at 15:00
  • Glad I could help you! let me post it as an answer for you. :) – AzkerM Apr 14 '14 at 15:01
2

By the look of the issue, it seems you've not installed PHP as it denies to view page, and downloads instead.

As I've commented, Apache doesn't come packed with PHP as it is a separate package. Installing php package should simply fix your issue.

| improve this answer | |
0

try

sudo apt-get install php5

apache2 doesn't come with php preinstalled. And then restart apache2

sudo service apache2 restart
| improve this answer | |
  • A more complete command is sudo apt-get install php5 libapache2-mod-php5. Installing only the php5 package is not enough, you also need to install the apache php module. – Dan Apr 17 '14 at 10:26
  • Oh, did not know that :D – viktorstrate Apr 17 '14 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.