ihaveitnow
ihaveitnow

Reputation: 113

Browser not loading Php pages

Im using a linux machine, and I followed the instructions seen on https://www.php.net/manual/en/install.php to setup php, apache and my sql.

I did exactly what it said and nothing more, but when I try to open a .php file with firefox or chrome, it downloads...?

Im following a tutorial on learning php seen here: http://devzone.zend.com/node/view/id/625

Upvotes: 1

Views: 2911

Answers (2)

Josh K
Josh K

Reputation: 28893

Note that if you have a file:// URL in the browser address bar it isn't interacting with the server to process the page.

You will need to use http://localhost/path/to/page/page.php

Upvotes: 1

Kuba Tyszko
Kuba Tyszko

Reputation: 408

According to this howto:

https://www.php.net/manual/en/install.unix.apache.php

Please make sure you did steps 14 and 15, what is happening - probably your webserver doesn't recognize php scripts AS php scripts, and sends those to your browser - resulting in either download or displaying the source.

Thanks

Upvotes: 1

Related Questions