Forum Moderators: phranque

Message Too Old, No Replies

Error with QUERY STRING

         

vol7ron

3:48 pm on Apr 16, 2008 (gmt 0)

10+ Year Member



This could be a problem with the server but any help is appreciated.

program.pl?variable=value
print "Query String: ".$ENV{'QUERY_STRING'}; # this shows 'Query String: variable=value'

program.pl?variable-value
print "Query String: ".$ENV{'QUERY_STRING'}; # this shows an error

The issue is for any argument passed into the query string without an equal sign. 

[b]All of these generate errors:[/b]
program.pl?test
program.pl?-test

[b]And these don't generate errors:[/b]
program.pl?test=
program.pl?=test

So I know part of the problem, I just don't know how to solve. Is it a problem with the Server, or maybe an outdated module, or even a configuration setting somewhere?

By the way I tried the same script on other free hosts. When trying to find a solution I found someone who had a similar problem and he noticed it was happening on one of his IIS virtual servers (and not the main server).

My problem occurs on a: Apache/1.3.37 (Unix) system running a Solaris Perl Compiler Version OS
The one it works on is: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b mod_mono/1.2.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 with a Linux Perl Compiler Version OS

Thanks for your help.
vol7ron

jdMorgan

6:01 pm on Apr 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is apparently a PERL question, and might get better & more useful responses in our PERL forum.

However, one bit of information that might be quite useful for readers here to know is, "What specific error are you getting?"

Jim