Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed Apache, PHP and MySQL with no errors and I can run the PHP program from the command prompt.

But, I can't get a PHP page to display in the browser.

When I try to view a PHP page in Google Chrome, I get this error:

Oops! This link appears to be broken

Whereas a blank webpage appears in Mozilla Firefox.

Can you please suggest a solution to this?

Please don't just say that I should check the Apache/PHP configuration. If that is your answer, please also suggest what exactly should I be checking there.

share|improve this question

migrated from stackoverflow.com May 6 '11 at 15:21

This question came from our site for professional and enthusiast programmers.

    
What are you accessing ? localhost ? Have you put an index page in the root www folder ? –  Heandel May 6 '11 at 15:13
    
Please check apache access and error logs, and post some additional information (e.g. your OS, Apache DocumentRoot and the page you are trying to visit, its URL). As is, your question may have many different answers. –  Paolo Stefan May 6 '11 at 15:16
    
Have you checked with another browser? You may have some problem with how chrome handle url/search –  slubman May 7 '11 at 7:43
add comment

3 Answers 3

  • Check the access log recorded by the web server (to make sure the request is being received)
  • Check the error log recorded by the web server (to see what the server said went wrong)
  • Use something like Charles or Firebug to examine the HTTP request and response in detail (so you know exactly what is being requested (and can match it to what you expect) and what the response is)

They should give you enough information to identify the problem.

share|improve this answer
2  
+1 for "check the server error log". –  Spudley May 6 '11 at 15:15
add comment

Open httpd.conf file and in <IfModule mime_module> section add this:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Then restart your apache server and test again the your page if its display correctly.

share|improve this answer
add comment

I think you aren't using true folder to serve for your pages. If you put your pages true Apache Server's folder ( like /var/www ) , you can see pages. Maybe your php pages don't work, but you have to see your codes in your php file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.