Forum Moderators: phranque
I am hosting my .net domain with AwardSpace which is a free webhost provider. I am also hosting my .com with GoDaddy and the support is really so excellent that I had to rely on experts here to solve my problem.
I have loads of html which have PHP code embedded in it. I use php in html to include various header and footer files. It is impossible for me to change all of these to .php now as I have many files.
One of the file http://www.example.com/admin/listmessages.html is not working while an exact copy in PHP extension http://www.example.com/admin/listmessages.php works.
This is the environment on GoDaddy.
.httpd.conf access and mofidication is not allowed.
.htaccess is allowed.
PHP runs in cgi mode.
I added this line in the .htaccess and I still get the PHP as it is without being parsed
AddType application/x-httpd-php .php .html
I have searched the web, this forum and other engines and tried all possible combinations but it doesn't work.
AddHandler server-parsed .php .html - Doesn't work
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html - Doesn't work
Can someone please help? Thanks a ton for your directions.
Regards
iON Admin
[edited by: jatar_k at 2:35 pm (utc) on Aug. 27, 2006]
[edit reason]
[1][edit reason] no urls thanks [/edit] [/edit][/1]
AddHandler server-parsed .php .html
There's massive confusion in the "php world" about this, but AddType has to do with MIME_Types and AddHandler has to do with whether a file is to be executed or parsed by a program or interpreter on the server or simply sent to the client.
At some point, a kludge was added to Apache, but otherwise, "AddType x-application..." should have no effect on whether a file is parsed on the server. And if it is parsed on the server, then with that directive in force, its output should be sent to the client application for further processing with that MIME-type.
It looks like someone added a hack to make life easier, and this just led to a lot of confusion.
In short, if
AddHandler server-parsed .php .html
Jim
When I add AddHandler server-parsed .php .html, both php and html are not parsed anymore :-(
I am also having a tough time convincing GoDaddy that this is not how it is supposed to work, and that something is wrong in their configuration, but they are not budging from their stereotype answer "We do not support for scripts". :-(
Regards
iON Admin
If the answer is yes; then it could be done
and triggers:
A) they are too much $ focussed
B) Customer service is not the main concern
On a shared server it could be tough to get many
or any PHP.ini or HTTP.conf modif.
If you are not in programming and use only php to include a few files
why not doing the same includes with SSI
Because application/x-httpd-php is a MIME-type, it is by definition, not an action type.
Here's another recent thread on a closely-related topic: [webmasterworld.com...]
The thread cited by coopster is a good one.
Jim
Because application/x-httpd-php is a MIME-type, it is by definition, not an action type.
ScriptAlias /php/ /usr/local/php5/bin/
Action xyz /php/php
AddHandler xyz .php Action application/x-httpd-php /php/php