| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in Apr 2004
42 posts
Gave thanks: 0
Thanked 0 times
|
Apache CGI question
Hoping one of you Apache CGI gurus might know the answer to this.
Is there a way to tell the webserver to not allow execution of CGI from a particular subdir? I have a CGI installed which allows some of my users to upload files to a specific subdir on the website. What I want to prevent is them uploading some CGI script and executing it. Thanks. |
|
|
|
|
|
#3 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
|
You could use a php-upload script which only allowed uploads of certain types of files.
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
#5 (permalink) | |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
|
Quote:
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
|
#6 (permalink) | |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Quote:
|
|
|
|
|
|
|
#7 (permalink) | |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
|
Quote:
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
|
#8 (permalink) |
|
Registered User
Seasoned Poster
Joined in Apr 2004
42 posts
Gave thanks: 0
Thanked 0 times
|
I'm sort of sour on php based scripts to do any uploads. The files I'm uploading will most like be larger than 2MB. The problem with PHP is it relies to heavily on the PHP.INI variables, which I can't control on a shared environment. Hence the reason for switching to CGI.
Yes I guess I could stop them from uploading a certain filetype, but the CGI have is written in Perl. It would take me some time to figure out the language structure and add something to stop certain extensions from being uploaded. I'm using a CGI I pulled from http://www.pvdlab.net/en/commerce/wcom . It's ok, but could be better. In any event, I thought there might be something on the Apache end to only allow CGI code to be executed from within a certain subdir. It appears I can place CGI code anywhere in my subdirs and execute it and it doesn't have to be in the cgi-bin subdirectory. |
|
|
|