Forum Moderators: phranque

Message Too Old, No Replies

txt to php?

         

jake66

8:52 am on Aug 2, 2006 (gmt 0)

10+ Year Member



this worked on my previous host, but not with godaddy:
AddHandler application/x-httpd-php txt

i have also tried:

AddType application/x-httpd-php txt

and even switched the php & txt around, but all i was able to do was show the source code of my php file.

is there another method to using this, perhaps?

all they offer in their faq is this: [help.godaddy.com...]
(yes i do have configuration 2.0)

if their suggested method works to rewrite php5 to .php, why wouldn't it also work for .txt?

i have tried contacting their ever-so useless support, but they just sent me a cut & paste saying they can't help me with coding or specific instructions (how useful!)

i have access to a php.ini file as well.

lammert

9:16 am on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My experience with GoDaddy shared hosting plans, is that they have some caching system for .htaccess files. When you add one, it won't work until a few hours or a day later after the caching system has picked up the location of the .htaccess file.

Once the .htaccess file is identified, every change in it will have effect immediately.

encyclo

10:17 am on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check the help page again, you're missing the dot before "txt":

AddHandler application/x-httpd-php
.
txt

:)

coopster

12:22 pm on Aug 2, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



But in Apache the extension argument to
AddHandler
is case-insensitive and can be specified with or without a leading dot. I note in the Help document linked that they seem to have added a handler-name for PHP5 applications -- are you running PHP5 and would you need to use that handler instead?

jake66

6:47 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



My experience with GoDaddy shared hosting plans, is that they have some caching system for .htaccess files. When you add one, it won't work until a few hours or a day later after the caching system has picked up the location of the .htaccess file.

Once the .htaccess file is identified, every change in it will have effect immediately.


that's awful.. how the heck are you supposed to know if whatever you just did threw a 500 response?

are you running PHP5 and would you need to use that handler instead?

no, i am running 4.3.11 (Zend: 1.3.0)

lammert

6:53 pm on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



that's awful.. how the heck are you supposed to know if whatever you just did threw a 500 response?

If you receive a 500 response, the .htaccess is read by the web server, so it is not the caching problem I mentioned above. With the caching problem the server simple ignores the settings in the .htaccess. As soon as the .htaccess is identified, every change in it will immediately be seen by the webserver and be visible on the site.

jake66

5:45 am on Aug 4, 2006 (gmt 0)

10+ Year Member



Check the help page again, you're missing the dot before "txt":

AddHandler application/x-httpd-php .txt


nope, that didn't work either. :( is it possible they have this method filtered?

or is there something i can put in the php.ini to make this work?

jake66

5:59 pm on Aug 4, 2006 (gmt 0)

10+ Year Member



i've done a bit more searching and i see people are putting things similar to this in their php.ini, but i'm extremely new to php.ini (only heard of it a week or two ago) so i'm a bit touchy as to how to approach it.

what line could i put in php.ini to turn this back on?