Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Files won't open in browser - only download. What do I need to change to make it work properly?

I have tried reinstalling PHP. PHP is working, and Apache2 is running. I don't know why it's not opening in a browser and displaying normally.

Just so you know - my httpd.conf is empty - and instead I have everything in apache2.conf. This is because I'm using Ubuntu.

Can you help me? I know it's something simple, but I can't seem to find the answer.

like image 597
Itamar Avatar asked Nov 28 '22 18:11

Itamar


1 Answers

Have you virtual host on this project?

Are you open php file with http://localhost/file.php or directly like file://...../file.php ?

like image 76
Faraona Avatar answered Dec 01 '22 09:12

Faraona