Theburrito Posted February 21, 2008 Share Posted February 21, 2008 Hello all, I installed Apache 2.2.8 and PHP 5.2.5 on Win Xp SP2. After installing Apache I got the "It Works!" message. I can get the phpinfo screen to show me all the goodies. My problem lies in only PHP files are being processed. I can only get the phpinfo to come up if I point to test.php. The index (index.htm) file has a simple Hello World written as such: <? echo 'Hello World'; ?> which does not work. I'm pretty puzzled and frustrated here so any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/92359-php-isnt-behaving/ Share on other sites More sharing options...
PHP Monkeh Posted February 22, 2008 Share Posted February 22, 2008 Try using normal (proper) PHP tags, like so: <?php echo 'Hello World'; ?> Although you could enable short_tags in your php.ini file, I would advise you not to. It's always best to use long tags, it's 3 extra characters that will save you a lot of grief in the long run. Link to comment https://forums.phpfreaks.com/topic/92359-php-isnt-behaving/#findComment-473526 Share on other sites More sharing options...
PFMaBiSmAd Posted February 22, 2008 Share Posted February 22, 2008 By default only .php files are parsed by php. Any .htm/.html files are not. To get .htm/.html files to be parsed by php, find the AddType line in your httpd.conf (or a .htaccess file) that contains the .php and add .htm and .html - AddType application/x-httpd-php .php .html .htm Stop and start your web server to get any changes made to httpd.conf to take effect (not necessary if making this change in a .htaccess file.) Link to comment https://forums.phpfreaks.com/topic/92359-php-isnt-behaving/#findComment-473590 Share on other sites More sharing options...
Theburrito Posted February 22, 2008 Author Share Posted February 22, 2008 SOLVED!!! PFMaBiSmAd: Thank you! That's all it took. PHP Monkeh: Noted. I have short tags enabled but I'm used to the <?php as well. Thanks again! Link to comment https://forums.phpfreaks.com/topic/92359-php-isnt-behaving/#findComment-473887 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.