Udlei Nattis wrote:
fix problem

i need change SetHandler modperl to perl-script, now upload is ok

why this happens? i need add any options in SetHandler modperl to use upload ?

Please read: http://perl.apache.org/docs/2.0/user/config/config.html#C_SetHandler_

Do you say that you have no errors logged in error_log while using 'SetHandler modperl'? You should, because Apache->request dies if called under 'SetHandler modperl' and no 'PerlOptions +GlobalRequest'

I can see why the env reading was failing. We need to patch CGI.pm to die when the configuration is:

PerlOptions -SetupEnv

(which is effective with 'SetHandler modperl'), though we don't have the API to do so yet. Once I'll finish the filter API, I'll work on the perloptions API and then we will patch CGI.pm to do this check.

Meanwhile I believe CGI.pm can be patched to check for some cgi env var (e.g. $ENV{QUERY_STRING}) and if it's not there run $r->subprocess_env, which is in effect the same as 'PerlOptions +SetupEnv'. Can you give a try to this while keeping the setting 'SetHandler modperl':

# CGI.pm
sub new {
    my($class,$initializer) = @_;
    my $self = {};
    bless $self,ref $class || $class || $DefaultClass;
    if ($MOD_PERL) {
        my $r = Apache->request;
        if ($MOD_PERL == 1) {
            $r->register_cleanup(\&CGI::_reset_globals);
        }
        else {
            # PerlOptions -SetupEnv check
            # XXX: this should be really replaced with a check
            # of the SetupEnv perloptions check, once the API is available
            $r->subprocess_env unless exists $ENV{QUERY_STRING};
            $r->pool->cleanup_register(\&CGI::_reset_globals);
        }
        undef $NPH;
    }
    $self->_reset_globals if $PERLEX;
    $self->init($initializer);
    return $self;
}

the change is:

$r->subprocess_env unless exists $ENV{QUERY_STRING};

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to