views:

43

answers:

1

I am new to this of course.

I am trying to configure PHP and Apache on a new Amazon EC2 AMI. This is a very lightweight server so the Micro instance fits the bill.

I just need Apache PHP

I ran

 sudo yam install apache2
 sudo yam install php

I copied info.php to /var/www/html

info.php only contains

<? phpinfo(); ?>

when i browse to http://www.mydomain.com/info.php Apache serves info.php but it does not render it. I looks like apache is not configured to handle php files. What step or steps am I missing?

Thanks,

+1  A: 

First try using full tags, so your script would be.

<?php phpinfo(); ?>`

instead of <? ?>

If no luck, try:

sudo yum remove php
sudo yum install php

then service httpd restart

Alternatively try using one of the pre-built AMI's. Community AMI's have several LAMP configurations.

kron
Using '<?php phpinfo(); ?>' instead of '<? phpinfo(); ?>' fixed it. Thanks!!
Jamey McElveen