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!

phtml config

Status
Not open for further replies.

DZeta

Technical User
Dec 21, 2002
5
AR
Hi everybody.
I am trying to install phtml extensions in web server.
I have added this line to httpd.conf but it's still not working. Yes!!! :) I have restarted the service.

AddType application/x-httpd-php .phtml

I have created this test page

Please make me know if I must do something else.

Thank U
 
Hi,

I ran into this same problem. It didn't have to do with the config file for apache it had to do with the fact that the folder used 'php' is reserved and you have to name it something else. Name it php_work or something like that and it should work.

Hope this helps!
relax.gif

 
Hi guys,

First thing I notice is that your test page is named php and not phtml.

Also, as Spyderix mentioned, php is by default the directory for the PHP files, so you should not use that.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
>>...the folder used 'php' is reserved...

!?! I have never heard of this. In fact, I just tested this, and had no problem running a PHP script in a folder called 'php'.

>>I am trying to install phtml extensions in web server.
>>AddType application/x-httpd-php .phtml

I think there is some confusion here. Your syntax is correct if you want all your PHP files to have a .phtml extension (as in But if you want it to be like this: then your syntax should look like:

AddType application/x-httpd-php .php -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(
 
rycamor

My post was relating to a default install of PHP as a cgi on Windows.

Because the default php install is to an alias directory named php then when you start using local directories with the same names as an alias, you start getting conflicts as Apache looks in the PHP installation directory for your scripts rather than the local directory.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top