Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 05-20-2002, 02:50 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
cgi not working on a new script

i put something in my cgi-bin: /usr/lib/cgi-bin/test

the file "test" is just a little perl script. Whenever i try to view that script, i get Error 500: http://www.milanointeractive.com/cgi-bin/test

The other things in the cgi bin that i did not make seem to work ok.

I shebanged "test".. i.e. chmod 777 test but i still get the error.. does anyone know anything about cgi and why this might not be working?
sde is offline   Reply With Quote
Old 05-20-2002, 04:40 PM   #2 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Your path to 'perl' was wrong - it should have been '/usr/bin/perl' and it was set to '/bin/perl'. Executes fine now. I might recommend that you also append .pl to perl scripts or .cgi to any cgi script you make, just makes it a little easier to remember what script does what and what language it's in.

BTW, to chmod a globally available script 777 is a big no-no. You should at least use 755, and I recommend 751.

bdl is offline   Reply With Quote
Old 05-20-2002, 05:29 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
thanks b =) i took the .pl off because i thought it might be a reason why it was messing up.

that helps a bunch! :rock:
sde is offline   Reply With Quote
Old 05-20-2002, 08:29 PM   #4 (permalink)
MiLady Mirlyn
lady gamer
 
MiLady Mirlyn's Avatar
 
Join Date: May 2002
Location: Right behind you...
Posts: 92
MiLady Mirlyn is on a distinguished road
yeah, remember, chmod 777 allows ANYONE to make changes (read, write, & execute)... not just those in charge... 755 allows everyone to read and execute. My personal choice is 755... but 751 is a little more secure.
__________________
Gun control is being able to hit your target!

MiLady Mirlyn is offline   Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Not Working Ilya020 PHP 1 06-02-2003 06:40 PM
PHP as CGI?? bdl PHP 8 05-08-2003 08:29 AM
cgi script Henry PHP 25 12-30-2002 06:54 AM


All times are GMT -8. The time now is 11:38 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting