Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP scripts not running in HTML pages

Status
Not open for further replies.

hpicken

Technical User
Apr 12, 2001
142
AU
Just built a new BSD server with apache 1.3 and php4.3 as a module.

After transferring files from old to new server, I'm finding that any .html pages with php scripts in the them no longer execute the php code.

PHP pages are find and work as before (phew :) ). I think it may just be a directive in Apache but not sure and can't seem to find any on the subject.

Any have any ideas.

Howard
 
Sounds like you haven't told apache to process .html and .htm pages using PHP.

The lines you inserted into httd.conf for .php should be repeated for .html aswell.


 
Thanks. Knew it had to simple. Add the following type in (for anyone in the future)

<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html .htm
#AddType application/x-httpd-php-source .phps
</IfModule>

Once again thanks LittleHavoc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top