[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] CGI problems (%ENV scrambled!)



I'm having problems getting my MacPerl CGIs to work on my Mac Web server.
Everything was working fine a week ago, when I was using a Quadra 610 running
System 7.5.5.  Now I have a G3/233 running MacOS 8.0.  I assume the problem
lies in the switch from System 7 to OS 8.

I've tried three different server software packages (Quid Pro Quo 1.0.2, Quid
Pro Quo 2.0.1, and MacHTTP 2.2.2), and the same thing happens every time.
(For the record, I have MacPerl 5.15r4.)

Anyway, here's the problem: the %ENV variables that come from the server get
completely mixed up!  As an example, here's a quick program I wrote:

	#!perl
	print "Content-type: text/html\n\n";
	foreach (keys %ENV) {
	  print "Variable: " , $_ , "<BR>\n";
	  print "Value: " , $ENV{$_} , "<P>\n\n";
	  }

And here's a sampling of its output, when run as a CGI:

	$ENV{'MACPERL'}: G3:MacPerl:
	$ENV{'acs.bitstream.net'}: SERVER_PORT
	$ENV{'80'}: SCRIPT_NAME
	$ENV{'iso-8859-1,*,utf-8'}: HTTP_ACCEPT
	$ENV{'http://acs.bitstream.net/'}: HTTP_USER_AGENT
	$ENV{'MacHTTP/2.0'}: GATEWAY_INTERFACE

The only ones which are displaying properly are MacPerl's "internal"
environment variables: TMPDIR, MACPERL, PERL5LIB, and USER.  The rest have
values where subscripts should be and subscripts where values should be, but
they don't even match up.  It looks random.  (By the way, my little test
program works fine on UNIX.)

Please forgive me if this is a frequently asked question on this mailing
list; I couldn't find any info about it elsewhere on the Net.

Adam



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch