No, nothing has changed in Perl nor does this problem have anything to do with Perl in particular. You would experience this problem with any cgi script, whether written in C, C++, Bourne shell, etc. Let me explain how it works...
>From your web browser, whenever you request a cgi script to be run, the web server launches a new process, calling the script. The web server captures the STDOUT stream coming from the script and redirects it back to the browser window. If the content type tag is missing, the browser won't know what to do with it. The browser expects the server to tell it what data format it is sending back. The only thing I can see that might have changed is your browser's behavior or perhaps something on the web server. The only way I can see this script ever having worked as you describe is if the server inserted the content type tag for you behind your back, or the browser somehow detected it was plain text and displayed it. Are you absolutely sure you've seen this script work via a web browser call? I've never seen this work without the content type tag. cn -----Original Message----- From: Jerry Bogren [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:50 PM To: [EMAIL PROTECTED]; [email protected] Subject: RE: Windows 2003 and active perl build813 Your assumption is right. And the instructor will shortly try this. But curoius as I am has something changed in Perl so the basic script no longer works with out the content type tag??? Jerry Bogren Computer Dept Riverland Community College 1900 8th Ave NW Austin MN 55912 land 507-433-0690 cell 507-438-3954 [EMAIL PROTECTED] >>> Chris Newman <[EMAIL PROTECTED]> 09/29/05 12:04 PM >>> I presume you are calling it from a web browser interface. The screen will be blank because you are missing the Content-type: text/html tag. Try changing the script to... print "Content-Type: text/html\n"; print "\n"; # <--- blank line needed before html doc print "Hello world!\n"; Then see what happens. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Bogren Sent: Thursday, September 29, 2005 11:21 AM To: [email protected] Subject: Windows 2003 and active perl build813 I recently rebuild our student web server upgrading to Windows 2003( App server) and Active perl build 813. Perl is running and I can run this script just fine: File name: test1.pl $url = "http://$ENV{SERVER_NAME}$ENV{URL}"; $ip = "$ENV{REMOTE_ADDR}"; print <<ENDOFTEXT; HTTP/1.0 200 OK Content-Type: text/html <HTML> <HEAD><TITLE>Hello World!</TITLE></HEAD> <BODY> <H4>Hello World!</H4> <P>You have reached <a href="$url">$url</a></P> <P>Your IP Address is $ip</P> <H4>Have a nice day!</H4> If the Riverland URL and your IP show above Perl is working.<br><br> The back button will return you to the main page.<br> </BODY> </HTML> ENDOFTEXT exit(0); But this basic script: File Name test2.pl print "Hello, world!\n"; Produces a blank screen * I know this used to work but .......................... why not now. I am not a perl scripter and niether is the instructor so we have no clue. Thanks _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
