phpinfo.php doesn't work

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
cloksin
Forum Newbie
Posts: 2
Joined: Sun Nov 28, 2010 2:58 pm

phpinfo.php doesn't work

Post by cloksin »

I have a server running CentOS that I just installed MySQL, Apache, and PHP on. Its a remote server and I connect through an SSH client. Apache has been succesfully installed, and I've created a phpinfo.php file and placed it in the correct directory. I can navigate to my website using a browser and my URL, but when I try to navigate to the phpinfo.php file all I get is the code in the file, it displays, but doesn't execute. Please help, I have been ripping my hair out trying to get this to work.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: phpinfo.php doesn't work

Post by pickle »

Do other php files work? If not, then Apache/PHP aren't configured properly. If Apache doesn't know what to do with PHP files, it'll just display them as regular text files.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
cloksin
Forum Newbie
Posts: 2
Joined: Sun Nov 28, 2010 2:58 pm

Re: phpinfo.php doesn't work

Post by cloksin »

No, no other PHP pages work. What do I need to do in order to properly configure PHP and Apache to render PHP pages?
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: phpinfo.php doesn't work

Post by mikosiko »

Post Reply