I installed all the LAMP and my file.php is inside /var/www, but when i try to open my file.php on browser for watch the preview the browser ask me a open/download of my file.php.. And the page is blank. Please help me i tried all kind off solutions online but anything works!
Asked
Active
Viewed 306 times
0
-
1Possible duplicate of Apache doesn't execute PHP files, but makes me download them – Florian Diesch Nov 20 '15 at 03:28
-
1Didn't work.... – Manuel Caia Nov 20 '15 at 04:17
2 Answers
0
I am still new, but am working on something similar. My files are in var/www/html. Not sure if moving them to the html folder would help, but might be work a shot. Also, are you accessing from localhost? If you are developing locally, you should be able to type in localhost in your browser and see a file directory, you can also try localhost/(yourfilename).php

Chris
- 163
0
You need to install libapache2-mod-php5
and then you need to enable it by : a2enmod php5
and finally restart apache and will works.

Nikolay Nikolov
- 6,205