Forum Moderators: phranque

Message Too Old, No Replies

PHP Include Files Not Working Using Forcetype

         

fuzzydice

3:38 am on Jun 29, 2008 (gmt 0)

10+ Year Member



Hi all,

I'm a long time reader of this forum, but just joined to post. I'm using the following in my .htaccess file to have extensionless page URL's. The web pages are PHP pages like example-video.php. The browser address bar is displaying [mydomainname.com...] as it should.


<Files ~ ^(example-videos¦example-videos2)$>
ForceType x-mapp-php
</Files>

The problem I'm having is my PHP include files are not working with the above code in my .htaccess file. They are not displaying what they should output on the pages. They are simple include files with just an echo function to output some html. What would cause this to happen, and how can I fix it? Please excuse and move if this is in the wrong section.

Any help would be very much appreciated. Thanks.

jdMorgan

3:35 pm on Jun 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The correct method -- using AddType/ForceType versus using AddHandler -- depends on how PHP is installed on your server. Take a look at the various "installing PHP" threads in our PHP forum library for more information.

Jim

fuzzydice

5:28 am on Jul 12, 2008 (gmt 0)

10+ Year Member



I left this for a few days and am now just getting back to it. I did look around in the PHP section but didn't really find anything related to this. I found out how my server is configured. PHP is run as CGI on this server and the Apache version is 1.3.34.

Can anyone offer any more suggestions, or should I post this in the PHP forum?