real beginners stuff

2002-08-13 Thread Jimmy George

Hello World

If I logon to the web via (say) server_a and then start this script in server_b
which has the code in its cgi-bin folder

#! /usr/bin/perl -w
#
use CGI qw(:standard);
#use strict;
#
print END_of_file;
Content-type: text/html

html
headtitleServer Environment/title/head
body
h2This server is:/h2brbr
Server Name:$ENV{SERVER_NAME}
Port Number:$ENV{SERVER_PORT}
Server Software:$ENV{SERVER_SOFTWARE}
/body/html
END_of_file

should I get to see the %ENV details of server_a?

I am getting a 500 error. Permissions are set to 711 for the script and
701 for the folder.

cheers

Jimmy George


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: real beginners stuff

2002-08-13 Thread Connie Chan

Don't have exact idea, but see inline comments :

 
 #! /usr/bin/perl -w
Try #!/usr ... you've added a space there.

use CGI::Carp qw(fatalsToBrowser); # try add this line

[...]
 
 should I get to see the %ENV details of server_a?

Not, but you might check your error.log so you'll get
a better idea on what exact the error is .

 
 I am getting a 500 error. Permissions are set to 711 for the script and
 701 for the folder.

Try make them all 755.

Rgds,
Connie


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: real beginners stuff

2002-08-13 Thread Scot Robnett

Try printing the content type before your HERE doc, not within it.

Scot R.
inSite


-Original Message-
From: Jimmy George [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 13, 2002 2:03 AM
To: cgi
Subject: real beginners stuff


Hello World

If I logon to the web via (say) server_a and then start this script in
server_b
which has the code in its cgi-bin folder

#! /usr/bin/perl -w
#
use CGI qw(:standard);
#use strict;
#
print END_of_file;
Content-type: text/html

html
headtitleServer Environment/title/head
body
h2This server is:/h2brbr
Server Name:$ENV{SERVER_NAME}
Port Number:$ENV{SERVER_PORT}
Server Software:$ENV{SERVER_SOFTWARE}
/body/html
END_of_file

should I get to see the %ENV details of server_a?

I am getting a 500 error. Permissions are set to 711 for the script and
701 for the folder.

cheers

Jimmy George


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: real beginners stuff

2002-08-13 Thread Bob Showalter



 -Original Message-
 From: Jimmy George [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 13, 2002 3:03 AM
 To: cgi
 Subject: real beginners stuff
 
 
 Hello World
 
 If I logon to the web via (say) server_a and then start this 
 script in server_b
 which has the code in its cgi-bin folder
 
 #! /usr/bin/perl -w
 #
 use CGI qw(:standard);
 #use strict;
 #
 print END_of_file;
 Content-type: text/html
 
 html
 headtitleServer Environment/title/head
 body
 h2This server is:/h2brbr
 Server Name:  $ENV{SERVER_NAME}
 Port Number:  $ENV{SERVER_PORT}
 Server Software:  $ENV{SERVER_SOFTWARE}
 /body/html
 END_of_file
 
 should I get to see the %ENV details of server_a?

I don't know what you mean by sever_a and server_b. The 
environment variables you're referencing are based on the 
server actually handling the current request.

 
 I am getting a 500 error. Permissions are set to 711 for the 
 script and
 701 for the folder.

711 is bad. Perl has to be able to read your script to execute it.
Try 777 for the script and 755 for the folder. The script will be
executed under the web server user.

Whenever you get a 500 error, look in the server error log for
additional messages. The 500 is just a catch-all generated by
the server saying your script had some kind of problem. I'll wager
that if you check the error log, you'll see some sort of Permission 
denied message(s).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: real beginners stuff

2002-08-13 Thread perl-dvd

Jimmy,
Sorry I had not read this post before I replied to the other.

You need the permissions on a folder to be readable and executable in order for people 
to read what
is in that folder period (not just execute scripts).  So your folder needs to be 
permissions 755.
Your script must be readable and executable in order for somebody to run your script, 
so again
permissions 755.
3 digit permission assignments:
- first position is the file owners permissions
- second position is the file groups permissions (permissions for everyone in the 
group of the user
who owns the file)
- third position is the permissions for the whole world.

how to get a permission digit:
4 = read
2 = write
1 = execute

Add all of the allowed permissions to get the permission digit
example, 7 allows anything, 6 is read and write, 5 is read and execute.

Directories are kinda strange because you have to be able to execute them in order 
to get a
directory listing.

Regards,
David




- Original Message -
From: Jimmy George [EMAIL PROTECTED]
To: cgi [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 1:02 AM
Subject: real beginners stuff


Hello World

If I logon to the web via (say) server_a and then start this script in server_b
which has the code in its cgi-bin folder

#! /usr/bin/perl -w
#
use CGI qw(:standard);
#use strict;
#
print END_of_file;
Content-type: text/html

html
headtitleServer Environment/title/head
body
h2This server is:/h2brbr
Server Name: $ENV{SERVER_NAME}
Port Number: $ENV{SERVER_PORT}
Server Software: $ENV{SERVER_SOFTWARE}
/body/html
END_of_file

should I get to see the %ENV details of server_a?

I am getting a 500 error. Permissions are set to 711 for the script and
701 for the folder.

cheers

Jimmy George


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]