Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed latest centos as a desktop version. Then I installed php via yum and turned on httpd. Php code is being interpreted, but phpinfo() is messed up. I see all the html code as well as the phpinfo variables. How do I fix?

share|improve this question
PHP comes in many forms ( mod_php, cgi_php, fastcgi, etc) which one did you install, which one do you want. Did you install the correct version? – Zoredache Mar 19 '14 at 19:44
yum install php – xivix Mar 19 '14 at 19:45

Figured it out. phpinfo() will only display correctly if you browse to it using a domain name. I was using the server's IP and it would not display correctly.

share|improve this answer
Hmmm...this is not true. If this actually solved your problem, ok, but the root cause has, IMHO, more to do with your Web Server config – krisFR Mar 19 '14 at 20:16

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.