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 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 at 19:44
    
yum install php –  xivix Mar 19 at 19:45

1 Answer 1

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 at 20:16

Your Answer

 
discard

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.