LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > How to deny php execution in a subdir?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2004, 06:35 AM
bogus bogus is offline
Member
 
Join Date: Dec 2003
Location: Brittany / France / Europe
Posts: 31
Default How to deny php execution in a subdir?

Hello,

I'd like to prevent LSWS from executing php scripts that are in a particular directory (an upload dir, see the issue?)
In apache, I used to put this .htaccess:

AddType text/plain .php .php3

in the safe directory.

It does not work in LSWS. How can I do ?
Reply With Quote
  #2  
Old 03-24-2004, 12:25 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
There is no easy solution right now. We will add a similiar feature like that in the upcoming release. :-)
You need to remove php script handler at server level, define a general context with regular rexporession like "exp:^/safedir/", and a fast cgi context with regular expression like "exp:^/.*\.php", handler set to the php fast cgi. you need to make sure the first context is ahead of the second one in the configuration file.
Hope it is what you need. :-)
Reply With Quote
  #3  
Old 03-25-2004, 12:01 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I am probably wrong on my solution suggested as the fast cgi context with regular expression may not populate SCRIPT_FILENAME, nor PATH_INFO and PATH_TRANSLATED. You may have to place the whole "safedir/" out side the directory tree contains all php scripts.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing system php felosi PHP 3 07-16-2007 11:23 PM
Usability issue with LSAPI PHP jrmarino PHP 5 05-08-2007 01:54 PM
setup php in rails template cswilliams Install/Configuration 2 01-25-2007 08:21 AM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM
Custom PHP integration RikitZap Install/Configuration 2 04-25-2005 06:52 PM


All times are GMT -7. The time now is 11:45 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.