1

i can't run php on centos 6 with webmin and virtualmin (fresh install)

<? echo phpinfo ?>

when run above php code, it is blank, but right click source code, i can see the php code that is "" in plain text....

any ideas?

1
  • What web server, and how is it configured? Dec 30, 2011 at 3:22

2 Answers 2

1

First, does that filename end in .php?

If so, can you please run:

yum list installed | grep php 

and update with the results?

My initial guess is that PHP isn't installed. Assuming you don't see something like:

php-common.i686                    5.3.2-6.el6_0.1                   @updates   
php-mysql.i686                     5.3.2-6.el6_0.1                   @updates   
php-pdo.i686                       5.3.2-6.el6_0.1                   @updates  

then you need to run

sudo yum install php -y 

which will then install php and the dependencies. At that point, you'll want to restart your web service:

sudo service httpd restart 

And try the page again.

If it was already installed and restarting the service didn't help, then we'll have to actually look at the php config section of Apache. But lets verify that this is OK first.

1

Try this (entire contents of the file):

<?php phpinfo();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .