Forum Moderators: coopster

Message Too Old, No Replies

Problems with Included Files

.inc file problem <easy?>

         

madcat

12:10 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi-

In my .html pages, I've included php includes. For some reason, they fail to show up on the Web page. I tested to make sure php was enabled on my host with test.php ( phpinfo() )...no problem. It's just the .html files that won't display the php code output.

This is exactly the way I have it set up on my other sites by the way. I include php includes within my .html pages. In order for this to work I simply used a .htaccess file- so the server could parse .html files with php...

I tried to put this file within the actual includes folder- as well as in the regular directory with the index.html file...

nothing...

Why is .htaccess not doing the trick?

Thanks for any help

[edited by: madcat at 12:30 am (utc) on Oct. 30, 2003]

marcs

12:16 am on Oct 30, 2003 (gmt 0)

10+ Year Member



Assuming your host is indeed running Apache, they can allow/restrict what you can do with .htaccess files (via the AllowOverride directive, FileInfo being the one that controls this) or even not use/enable .htaccess files at all.

One of these could be why. Do other things work in your .htaccess file?

jdMorgan

12:22 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



madcat,

Ask your host if your account is configured with AllowOverride FileInfo or AllowOverride All.
You'll need at least the FileInfo setting to use the Addtype and AddHandler directives in .htaccess.

Personally, I demand AllowOverride All from any hosting company I consider using.

Jim

madcat

1:42 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AllowOverride All was On.

Tech support manually changed httpd.conf to read...

AddType application/x-httpd-php .php .php4 .php3 .phtml .html .htm

--> Adding .html and .htm

This is what I thought I was doing with .htaccess...? Bit confused as to why the changes didn't take effect.