Is it doing this for all PHP pages? Or just certain ones? (Example, a PHP script that generates an RSS feed tends to not open correctly if accessed in a browser, it's meant to be bookmarked with a RSS reader)
Here's a test to see if your Apache configuration is set up correctly to handle PHP.
Open up a text editor (Notepad or whatever), and add this text:
- Code: Select all
// Show all information, defaults to INFO_ALL
// Show just the module information.
// phpinfo(8) yields identical results.
Save this file in your web server's document root as info.php, and then in your browser, open http://localhost/info.php
(Be careful it doesn't append a .txt to the end of the file name).
If Apache is configured correctly, you should get a nice PHP configuration status screen.. if it's not, it'll ask if you want to save it, and Apache isn't configured right to handle PHP.