odd crash in file upload via CGI

M

msoulier

Hey people,

This one is baffling me. I'm moving from a RedHat 7.3 platform to
CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.

I have an upload dialog making use of a CGI with the CGI module that
works fine on the old platform, but all I get on the new platform is an
internal server error, due to no content being sent back to apache.

It would seem that the interpreter is sending nothing, and I'm having a
hell of a time finding out why. Running it on the command line with the
same environment does not produce similar results (thus, the
environment is obviously not similar enough). And yet, it seems like
the interpreter might just be crashing out for some reason.

Suggestions appreciated as to how to troubleshoot this going forward.

Mike
 
X

xhoster

msoulier said:
Hey people,

This one is baffling me. I'm moving from a RedHat 7.3 platform to
CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.

I have an upload dialog making use of a CGI with the CGI module that
works fine on the old platform, but all I get on the new platform is an
internal server error, due to no content being sent back to apache.

Does a simple "hello world" CGI work? Does your log file contain anything
useful?

Xho
 
B

Ben Morrow

Quoth "msoulier said:
Hey people,

This one is baffling me. I'm moving from a RedHat 7.3 platform to
CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.

I have an upload dialog making use of a CGI with the CGI module that
works fine on the old platform, but all I get on the new platform is an
internal server error, due to no content being sent back to apache.

It would seem that the interpreter is sending nothing, and I'm having a
hell of a time finding out why. Running it on the command line with the
same environment does not produce similar results (thus, the
environment is obviously not similar enough). And yet, it seems like
the interpreter might just be crashing out for some reason.

Suggestions appreciated as to how to troubleshoot this going forward.

Run it as whatever user it gets run as when it's called as a CGI.
CGI::Carp

Ben
 
M

msoulier

M

msoulier

Ben said:
Run it as whatever user it gets run as when it's called as a CGI.
CGI::Carp

Yeah, tried CGI::Carp already, and ran it as the right user. However, I
just removed and eval call and this error popped up. For some reason
the eval masked the problem. Perhaps it crashed the interpreter, not
sure.

Can't coerce GLOB to string in entersub at
/usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.

So this is apparently my issue. I didn't see it because evaling the
code and checking $@ for some reason did not turn the issue up. Very,
very odd.

Mike
 
C

Charles DeRykus

msoulier said:
^^^^^

Yeah, tried CGI::Carp already, and ran it as the right user. However, I
just removed and eval call and this error popped up. For some reason
the eval masked the problem. Perhaps it crashed the interpreter, not
sure.

Can't coerce GLOB to string in entersub at
/usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.
^^^^^

Is the version discrepancy between 5.8.5 and 5.8.0 expected... Could
your environment be picking up older installs...
 
M

msoulier

Charles said:
Is the version discrepancy between 5.8.5 and 5.8.0 expected... Could
your environment be picking up older installs...

I don't believe so, but I suppose I should ask the CentOS people, and
the owner of the Dag repository. I believe that's where the code is
coming from.

Mike
 
M

msoulier

msoulier said:
Can't coerce GLOB to string in entersub at
/usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.

And believe it or not, this little bit of code prevents it from
happening.

foreach my $param ($cgi->param)
{
my $val = $cgi->param($param);
my $string = "$val";
}

Seems completely unrelated, but if I don't stringify the incoming
parameters once, then it crashes.

Any perl gurus with black magick to explain this one for me?

Cheers,
Mike
 
P

Paul Lalli

msoulier said:
^^^^^
Any perl gurus with black magick to explain this one for me?

5.8.0 is notoriously buggy. You use known-buggy software, you
encounter bugs. Upgrade.

Paul Lalli
 
M

msoulier

Paul said:
5.8.0 is notoriously buggy. You use known-buggy software, you
encounter bugs. Upgrade.

If you'll check the thread, you'll find that I'm running 5.8.5.

Mike
 
P

Paul Lalli

msoulier said:
If you'll check the thread, you'll find that I'm running 5.8.5.

If you'll check the paths in the error messages, you'll see you're
using modules from a 5.8.0 installation.

Paul Lalli
 
M

msoulier

Paul said:
If you'll check the paths in the error messages, you'll see you're
using modules from a 5.8.0 installation.

Indeed, as packaged by CentOS. Still, the interpreter is 5.8.5, and I
tried a newer CGI::persistent and it didn't fix the issue. We seem to
be using the latest Persistence::Object::Simple and the latest
Data::Dumper, which is where the error appears to be occurring.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top