Page 1 of 1

PHP not working correctly...

Posted: Wed Oct 10, 2007 10:31 am
by rishford
Hi Guys

First time in a PHP forum (not to mention using PHP) so bear with me.

I have currently installed Apache Web Server 2.2, MySQL 5.0 and PHP 5.0 (all using windows XP installers) onto my machine. I know that MySql and Apache are both working correctly, so to test that PHP is working also I created a test.php using <? phpinfo(); ?> I have placed it in the htdocs folder so it can be accessed using the url: http://localhost/test.php:

<html>
<body>
<? phpinfo(); ?>
</body>
</html>

I get two results:
IE7 - Blank Page
Firefox - Displays the html source code

Is there anything I have to do to ensure that the PHP code is recognised?

Thanks :)

Posted: Wed Oct 10, 2007 1:52 pm
by John Cartwright
Just so we don't over-complicate this problem, lets just make sure short tags are enabled first.

Code: Select all

<? phpinfo(); ?>
should be

Code: Select all

<?php phpinfo(); ?>