|
|
|
|
![]() ![]() |
Feb 12 2005, 04:40 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 6-February 05 Member No.: 2,543 |
Here's my code:
CODE #!/usr/bin/perl # print "Content-type: text/html\n\n"; print "Howdy, world!"; I saved it in my cgi-bin with 777 permissions and It goes; QUOTE Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@supper.astahost.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. -------------------------------------------------------------------------------- Apache/1.3.33 Server at www.supper.astahost.com Port 80 I'm probably doing something really dumb... tell me what it is? |
|
|
|
Feb 13 2005, 02:59 AM
Post
#2
|
|
|
BUG.SWAT.PATROL Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
I see nothing wrong with this script, as long as the file extension is .pl or .cgi it should work, I would try .pl as the extension first before attempting .cgi.
chmod 755 instead of 777. 0 = no permissions 1 = execute only 2 = write only 3 = write and execute 4 = read only 5 = read and execute 6 = read and write 7 = read, write and execute CODE #!/usr/bin/perl ######### # hello.pl # ######## print "Content-type: text/html\n\n"; print "<p>Howdy, world!</p>"; Cheers, MC |
|
|
|
Feb 13 2005, 10:01 PM
Post
#3
|
|
|
Teh Teckeh Trekkeh Group: Members Posts: 682 Joined: 8-September 04 From: Scotland, UK Member No.: 389 |
Why 755 instead of 777?
It should affect that particular thing shout it? |
|
|
|
Feb 14 2005, 09:47 AM
Post
#4
|
|
|
BUG.SWAT.PATROL Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
Yourself as the owner should have ( r)ead (w)rite and e(x)ecute permission over that file.
The group/others, such as 'the world' should not have writable access. In some cases, making the file world writable will not allow the script to be used at all, in which case it will most definitely work if set to 755, if your script needs to write to a directory, that's ok, it'll be executed under your owner's permission which you've given it the ability to write/delete. All other regular files should have permissions set to 644. Cheers, MC |
|
|
|
Aug 18 2005, 03:57 PM
Post
#5
|
|
|
Member [ Level 2 ] Group: Members Posts: 56 Joined: 17-August 05 Member No.: 7,907 |
QUOTE(mastercomputers @ Feb 14 2005, 04:47 AM) Yourself as the owner should have ( r)ead (w)rite and e(x)ecute permission over that file. The group/others, such as 'the world' should not have writable access. In some cases, making the file world writable will not allow the script to be used at all, in which case it will most definitely work if set to 755, if your script needs to write to a directory, that's ok, it'll be executed under your owner's permission which you've given it the ability to write/delete. All other regular files should have permissions set to 644. Cheers, MC Thanks thisthread was helpful to me explans what I was doing wronge on a few pages. was using ws-ftp to change the permissions was going to far. will check it out in a few days. thatns for the info you may of answered two people at one shot. |
|
|
|
May 1 2006, 05:38 PM
Post
#6
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 8 Joined: 1-May 06 Member No.: 13,141 |
The hello world thingy is just an simple example of what a CGI is, it doesnt do anything tho, and if u dont put it a 755 permission it will NOT work
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 03:16 PM |