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

Re: [MacPerl] CGI problems (%ENV scrambled!)



I have tried this on both my PowerPC computers (a PCC PowerCenter Pro 180
and a PowerMac 7100/66) both with Mac OS 8 and MacPerl 5.1.5r4, using
NetPresenz 4.1 and MacHTTP 2.2.2.

I get perfectly fine results using your script:

Variable: SERVER_SOFTWARE
Value: MacHTTP/2.0

Variable: GATEWAY_INTERFACE
Value: CGI/1.1

Variable: MACPERL
Value: PowerPudgeIII:Programming:MacPerl Ù:

Variable: REMOTE_ADDR
Value: 127.0.0.1

Etc.

One concern of mine is that the output you gave us is not the output of
your script.  That might be nothing, but it could be part of the problem
here.  If you have not done so, please use that exact script you posted and
check the output of it.

Anyway, something else to check is the extension you saved this with.
Please check the name and date of that extension.  I am aware it has not
gone under substantial revisions since it was first released, but please
check it anyway.

I know one other person mentioned a problem; Jean-Michel, were you also
using a G3 PowerMac?  Did anyone else have this problem?  And if so, what
was the configuration of your machine?

Thanks,

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#




At 14.48 12/17/97, Adam Schneider wrote:
>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



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