Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 6th, 2004, 08:50 PM
rythan rythan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 rythan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CGI Halfwit needs help!

If I have a CGI script, how do I use it in a page?

For example I have on my webspace nph-proxy.cgi in /prx/cgi-bin/

Where do I put html files, etc? Please, spell it all out.

Reply With Quote
  #2  
Old February 6th, 2004, 11:12 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
rythan,
welcome to the forums...

it all depends on your server...

i assume you access your page using:
http://server-name/something.html

so i'll assume your cgi scripts are running in:
http://server-name/cgi-bin/script.cgi

the actual directory structure on the server is always different... although a common one is:
usr/me/public_html
usr/me/cgi-bin

I don't know if this helps out all...
feel free to rephrase your question, and we'll try out best to answer accordingly...

Reply With Quote
  #3  
Old February 7th, 2004, 12:33 AM
rythan rythan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 rythan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok, take into account that I am completly green when it comes to this.


This is the dir that I'm sticking all the proxy files in:
URL

This is where I put the cgi file:
URL

If I just copy and paste a html file that works from somewhere, I run into this problem:
URL

I know that I've messed this up (I knew that to start with). So I'm just looking for some newbie friendly advice.

EDIT: IE, I need to know what files I have to create, and where to point the inputs.

Reply With Quote
  #4  
Old February 7th, 2004, 10:13 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Is your server capable of running CGI scripts?

here's what happened for me...
I went to http://members.optusnet.com.au/rythan/prx/ and was presented with a form... I poked around your HTML and noticed it was submitting to http://members.optusnet.com.au/ryth...n/nph-proxy.cgi (with some other stuff on the end of the URL)... well, i typed the address in (for nph-proxy.cgi) and my browser prompted me to download the file... I then downloaded your source file...

This is a huge security risk... a couple ways to fix this... 1) make sure you're putting your CGI scripts in the proper directory (refer to your server admin for that)... 2) make sure you've set the proper permissions... CGI needs executable set for other... a common permission setting is 755, or rwxr-xr-x...

I'm not sure why you've got the stuff appended to the end of the action url in your HTML form... You should simply put point to the CGI file (as i mentioned before)

Try to fix the permissions before you do anything...

Reply With Quote
  #5  
Old February 7th, 2004, 08:21 PM
rythan rythan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 rythan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I just realised that my ISP doesn't support CGI scripts. Thanks for your help anyway though.

Reply With Quote
  #6  
Old February 9th, 2004, 08:13 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
that could also be a problem... =)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > CGI Halfwit needs help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway