Current location: Hot Scripts Forums » Programming Languages » PHP » php files in a cgi-bin directory


php files in a cgi-bin directory

Reply
  #1 (permalink)  
Old 12-31-03, 01:35 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
php files in a cgi-bin directory

hey all is there a way to put non cgi files in a cgi-bin directory - i know this sounds stupid but this login/registration script i have only seems to protect files that are in cgi-bin/foldername/protectedfolder/ and the files i need to protect are actually a download database which is written in php.. Although i can't seem to call the files when i have them in the cgi-bin even with chmod the permissions to 755 and leaving them all at what they were upon upload..

Is this possible?

Thanks,
Bill
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-31-03, 03:34 PM
fusian fusian is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by epic1231
hey all is there a way to put non cgi files in a cgi-bin directory - i know this sounds stupid but this login/registration script i have only seems to protect files that are in cgi-bin/foldername/protectedfolder/ and the files i need to protect are actually a download database which is written in php.. Although i can't seem to call the files when i have them in the cgi-bin even with chmod the permissions to 755 and leaving them all at what they were upon upload..

Is this possible?

Thanks,
Bill

This isn't possible to my knowledge, the cgi-bin allows execution on the back end of the server for stuff like C++ and Perl applications which need access to the server itself.

It may be more productive and easier to modify the script you are using to protect the files, have you tried applying a very basic knowledge of programming in trying to find where the path variable/constant is in the protection script so that you can change it to another directory?
__________________
------------------
Fusian
www.efusian.co.uk
mail@efusian.co.uk
------------------
Linux Disks and Open Source Software is Available in our eStore now! Checkout at http://www.efusian.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-31-03, 03:39 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
well i've tried to change the path to outside of the cgi-bin to the folder /files/ but unforunilty it then does not seem to protect the script

beyond that my knowledge is slim.. What happens is after a user is logged in they are brought to a members page which is fine - on that page i was adding a link to the files in which they would have access to - the link in the cgi is /cgi-bin/quickregister/scripts/redirect.cgi?redirect=demo

which works or i can change demo to site and have it redirect to anywhere inside the public_html but if it is out of the cgi-bin it doesn't seem to protect that area (meaning i can bookmark it or file the url and return to it without having to login again which i do not want)

I'm using SQL Quickregister script it's a free script seems great and has all the functions i'm looking for but no support listed on the site - if you can think of anyway of protecting let me know i'm going to drop the author's an email to see if they can further help me out
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 12-31-03, 03:43 PM
fusian fusian is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by epic1231
well i've tried to change the path to outside of the cgi-bin to the folder /files/ but unforunilty it then does not seem to protect the script

beyond that my knowledge is slim.. What happens is after a user is logged in they are brought to a members page which is fine - on that page i was adding a link to the files in which they would have access to - the link in the cgi is /cgi-bin/quickregister/scripts/redirect.cgi?redirect=demo

which works or i can change demo to site and have it redirect to anywhere inside the public_html but if it is out of the cgi-bin it doesn't seem to protect that area (meaning i can bookmark it or file the url and return to it without having to login again which i do not want)

I'm using SQL Quickregister script it's a free script seems great and has all the functions i'm looking for but no support listed on the site - if you can think of anyway of protecting let me know i'm going to drop the author's an email to see if they can further help me out

Hmm, if that doesn't work then it will probably be that the design of the program will require it to be like that.

Have you thought of any other method of protection like using a user database and on login setting a cookie or session and then having on each protected page a header include which checks to make sure they are logged in correctly and have the right privelidges etc.?
__________________
------------------
Fusian
www.efusian.co.uk
mail@efusian.co.uk
------------------
Linux Disks and Open Source Software is Available in our eStore now! Checkout at http://www.efusian.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 12-31-03, 03:47 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
i tried to look into scripts as such but unforunitly i'm not very good with php just getting used to it and couldn't figure most of them type of login scripts out.. With each one i have done i'm changing my layout kinda (running a gaming network trying to setup so users can read reviews and whatnot but need to register before downloading files such as games/patchs demos trailers etc.etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
The Following User Says Thank You to epic1231 For This Useful Post:
adult dating (02-08-11)
  #6 (permalink)  
Old 12-31-03, 04:01 PM
fusian fusian is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by epic1231
i tried to look into scripts as such but unforunitly i'm not very good with php just getting used to it and couldn't figure most of them type of login scripts out.. With each one i have done i'm changing my layout kinda (running a gaming network trying to setup so users can read reviews and whatnot but need to register before downloading files such as games/patchs demos trailers etc.etc.

Sounds good.

What I'd tend to recomend is don't go for fancyness, all you need is a very very basic script that you may be able to start understanding even with very little PHP knowledge.

Reading other peoples PHP is the best way to learn. It's how I learnt, you will get a lot of satisfaction learning PHP, it's a great language.

Once you've found a login checking script - really you should only need to include it in each protected page, which you do using:

PHP Code:

include("/path"); 

It's that simple, just setting up takes a little time, but if a job is worth doing it's worth doing right! & learning new skillz is fun!
__________________
------------------
Fusian
www.efusian.co.uk
mail@efusian.co.uk
------------------
Linux Disks and Open Source Software is Available in our eStore now! Checkout at http://www.efusian.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 12-31-03, 04:19 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
is that all it is? see i couldn't figure out all the sessions and cookies so i gave up

Ok well with this script until i can do some more reading up like you said i came up with a temp fix - to access the download section they must be logged in anyways.. So what i did was removed the redirect script from there and added a javascript download popup that comes up when you click on the download with no frames no borders nothing but the page.. That way the users can bookmark i don't think the download page nor see what page it is when i install the block view source code..

Temp fix but i guess it works

Thanks for your help i do appreciate it - have a wonderful new years
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 12-31-03, 04:42 PM
fusian fusian is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by epic1231
is that all it is? see i couldn't figure out all the sessions and cookies so i gave up

Ok well with this script until i can do some more reading up like you said i came up with a temp fix - to access the download section they must be logged in anyways.. So what i did was removed the redirect script from there and added a javascript download popup that comes up when you click on the download with no frames no borders nothing but the page.. That way the users can bookmark i don't think the download page nor see what page it is when i install the block view source code..

Temp fix but i guess it works

Thanks for your help i do appreciate it - have a wonderful new years

Will do, don't forget to check my site, http://www.efusian.co.uk and let me know what you think

Temp fixes are all over the place mate, called hacking I've put some ancient hacks into my sites before just to get the things working to some level, often simplicity is the key - even complex fancy features tend to have simple code

Initiative is the key to the internet, you need to be able to overcome problems even if only temp basis to be a good programmer.

Happy new year!
__________________
------------------
Fusian
www.efusian.co.uk
mail@efusian.co.uk
------------------
Linux Disks and Open Source Software is Available in our eStore now! Checkout at http://www.efusian.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 05:28 PM
need help writing script to let user edit thier html or php files pinochio53 PHP 14 12-15-03 08:26 AM
PHP and TXT files JJSmallballer PHP 10 11-03-03 12:04 PM
writing Excel files through PHP pk_jsp PHP 4 09-28-03 06:42 AM
Script for picking the first HTML file out of a directory (with sorted HTML files) jelteveld Script Requests 0 08-16-03 02:30 PM


All times are GMT -5. The time now is 06:47 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.