I have upgraded to perl 1.99_16, perl 5.8.5 and apache 2.050 but am still seeing the same problem.

I just uploaded my test script to another server and the first time I ran it with no parameters, it showed parameters that were previously passed to a different program.

Could there be something in the way I have configured Apache that is causing this. From what I can see CGI.pm is supposed to work as normal with no changes under MP2.

Apache2 is configured with :

<IfModule prefork.c>
StartServers         1
MinSpareServers      1
MaxSpareServers      1
MaxClients           5
MaxRequestsPerChild  0
</IfModule>

.....

LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
PerlRequire /cp/etc/httpd/mod_perl.pl

.....

Alias /eventxcel/ "/cp/cpfiles/eventXcel/"
<Location /eventxcel/>
                SetHandler perl-script
                PerlResponseHandler ModPerl::Registry
                PerlOptions +ParseHeaders
                Options +ExecCGI
                Order allow,deny
                Allow from all
</Location>


$r->args() and $ENV{'QUERY_STRING'} both contain the correct values but what comes back from CGI makes no sense.


Ewan.



Arnaud Blancher wrote:
Ewan Bain wrote:

Hi,

Until yesterday I retrieved input variables to my CGI scripts myself. Now I need to do file uploads so decided to use CGI.pm (3.05).

Unfortunately I'm getting a problem where if I restart the server and run the program it get s variables fine but on all subsequent request it still only ever sees the original input parameters.

I'm using httpd-2.0.50, mod_perl-1.99_14 and perl5.8.3 on Debian.

To try and find my problem i created a small script :

#!/cp/apps/bin/perl

use CGI;
use strict;
use warnings;

my $q = CGI->new();

my $params = $q->Vars();

print "Content-type: text/html\n\n";
foreach my $key (keys %{$params}) {
    print "Key : $key - Param $params->{$key}<br>";
}

i test it on perl 1.99_16, perl 5.8.5, apache 2.050 on fedora 2
no problem's for me !

Arnaud.

It behaves exactly like my main program. I've been through as much of the Mod_perl docs as I could understand and searched google to no avail. I found some information in the CGI.pm docs but none of it appears to be applicable here.

I have also tried getting my $r = Apache->request; and passing it to CGI->new() but all I get back is :
Key : Apache::RequestRec - Param SCALAR(0x82a13f8)


I would really appreciate if someone can point out where I'm going wrong.

Thanks,
Ewan.






--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to