TwiztedCupid Posted December 23, 2006 Share Posted December 23, 2006 Hello,Yes I'm pretty much a n00b when it comes to PHP and Apache. I have the server all setup, php installed, PHP modules all setup in httpd.conf. I can run .php files with no problem. The one thing I'm not getting to work is [code]<?php phpinfo();?>[/code] It works when I save the file as test.php, but not when I save it as test.html, or test.htm. It just shows up as a blank page. I viewed the source and the code is still there. When I upload either htm file to another server, the phpinfo function works fine. I need to know if there's something in Apache or PHP that I have to configure to let this run properly on my machine.I'm using Apache 2.2.3 and PHP 5.2. Link to comment https://forums.phpfreaks.com/topic/31661-phpinfo-in-html/ Share on other sites More sharing options...
fert Posted December 23, 2006 Share Posted December 23, 2006 by default only .php files will be interpreted not .htm or .html Link to comment https://forums.phpfreaks.com/topic/31661-phpinfo-in-html/#findComment-146758 Share on other sites More sharing options...
trq Posted December 23, 2006 Share Posted December 23, 2006 You can add .html files to this list of php parsed files by locating and adding this line...[code]AddType application/x-httpd-php .html[/code]you should allready have a line there for .php, eg;[code]AddType application/x-httpd-php .php[/code] Link to comment https://forums.phpfreaks.com/topic/31661-phpinfo-in-html/#findComment-146759 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.