php forum
php mysql forum
php mysql smarty
 
Topic Options
#266071 - 01/04/04 04:22 PM .htaccess: ForceType application/x-httpd-php not working
Maze Offline
Enthusiast

Registered: 10/13/99
Posts: 468
I've added these lines to my .htaccess file:<br /><br /><Files blah><br /> ForceType application/x-httpd-php<br /></Files><br /><br />It does not work. The php-file "blah" is sent to the browser as plain text. I know there's a setting in the httpd.conf "AllowOverride", which has to be set to "All". But I'm on a shared server, so I do not have access to the httpd.conf.<br /><br />Is there any other way to force a file type to be treated as php script?

Top
#266072 - 01/04/04 04:56 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: mcse007]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
There is a way around it by using a custom 404 page(a script) <br />Read http://www.vbulletin.com/forum/showthread.php?p=133779&mode=linear#post133779 <br /> <br />I am using this method here: <br />http://www.shroomery.org/books/

Top
#266073 - 01/05/04 01:23 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: mcse007]
Pappy Offline
Member

Registered: 11/17/00
Posts: 235
Loc: Germany (US Citizen)
You may have to check and make sure that the tags are allowed for the script you are using if the apache server does not recognize the script as PHP it will tell the page to display as text I think. In any event if PHP is not on the server then it wont matter what you do it wont parse as anything other than text or a download. you might have to change the file extension to php3, php4 or some other name. This may be something to contact your host about.

Top
#266074 - 01/06/04 03:42 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: mcse007]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Is it an apache server at all?

Top
#266075 - 01/07/04 03:07 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: domain123]
Pappy Offline
Member

Registered: 11/17/00
Posts: 235
Loc: Germany (US Citizen)
[] I know there's a setting in the httpd.conf "AllowOverride", which has to be set to "All". [/] <br />indicates it is an apache server unless httpd.conf is used as the config file on other web servers as well?

Top
#266076 - 01/07/04 03:44 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: MercAqua]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
You´re right, I missed that detail.

Top
#266077 - 01/08/04 03:34 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: domain123]
Maze Offline
Enthusiast

Registered: 10/13/99
Posts: 468
Thanks for the hints so far, I'll try the 404 page-solution if I can find some more time...

Top
#266078 - 02/15/04 10:23 PM Re: .htaccess: ForceType application/x-httpd-php not working [Re: mcse007]
zb Offline
Lurker

Registered: 02/15/04
Posts: 2
Hello,<br />I had a similar problem, and it took me hours to figure out. When I installed PHP 4.3.4, it inserted this line in my httpd.conf:<br />AddType application/x-http-php .php<br />Instead of processing my php files, the source was sent to the browser. After extensive googling, I discovered that the line should be "application/x-httpd-php". So, try it without the 'd'. That must be correct for some systems, or it wouldn't be the default.<br /><br />(I was installing as a module on Apache 2.0.48 under YellowDog Linux.)

Top


Who's Online
0 registered (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks