My local Apache server doesn't run my php file, instead the web browser downloads it when I try to view it. I'm using LAMP on Ubuntu. Would you help me how I can solve this problem? Thank!
Asked
Active
Viewed 240 times
-1
-
possible duplicate of [browser downloads php file from apache web server](http://stackoverflow.com/questions/5591650/browser-downloads-php-file-from-apache-web-server) – Marc B Jul 10 '15 at 19:00
-
Problem solved, here is what I have done: I put back all my php file into the default html directory then I assigned DocumentRout variable to /bar/www/html/. DocmentRout variable is located in /etc/apache2/sites-available/000-default.conf file. Thanks for all ! – Teka Jul 11 '15 at 17:07
1 Answers
0
Did you tell LAMP to handle .php
files with the php5_module
?
Check your current php setting by creating a new php file in the htdocs
or www
direectory with the following content:
<?php phpinfo(); ?>
This will show you if your webserver can process php files or not

Henrik N.
- 3
- 5