You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "troy d. straszheim" <tr...@resophonic.com> on 2004/08/20 13:21:34 UTC
build bug?
Hi embperl:
I'm trying to get file upload working on a gentoo box. I've built
apache/perl/modperl and installed Embperl via perl -MCPAN -e shell.
The only symptoms that I'm seeing are that
$fdat{filetoupload} is not a valid filehandle (when you break up the
upload code to something like)
LOOPIT:
print STDERR $fdat{newpdf};
$bytes = read($fdat{newpdf}, $buffer, 8096);
defined $bytes || die "bytes not defined: $!";
print STDERR "read $bytes bytes\n";
if ($bytes == 0) {
goto DONE;
}
print UPLOAD $buffer || die "couldnt print to UPLOAD";
this gets you the error:
ERR: 24: Error in Perl code: bytes not defined: Bad file descriptor
at ...
The installation doesn't go, anyway. I've been attempting to use
gentoo's distribution. I install apache (the gentoo package appears to
install both 1.3.x and 2.0.x), then I install mod_perl, then attempt to
install Embperl at the CPAN command line, like
perl -MCPAN -e shell
install HTML::Embperl
and the output is:
CPAN.pm: Going to build G/GR/GRICHTER/Embperl-2.0.b11.tar.gz
... and everything looks OK until ...
Testing mod_perl mode...
#0 ascii... ok
#1 pure.htm... ok
#2 nooutput.htm... ok
#3 nooutput.htm... ok
#4 plain.htm... ok
#5 plain.htm... ok
#6 plain.htm... ok
#7 plainblock.htm... ok
#8 plainblock.htm... ok
#12 error.htm...
Expected 4 more error(s) in logfile
Input: test/html/error.htm
Output: test/tmp/out.htm
Log: test/tmp/test.log
Testparameter:
errors = 5
version = 2
repeat = 3
ERRORS detected! NOT all test have been passed successfully
Any ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: build bug?
Posted by Angus Lees <gu...@debian.org>.
At Fri, 20 Aug 2004 13:21:34 +0200, troy d. straszheim wrote:
> I'm trying to get file upload working on a gentoo box. I've built
> apache/perl/modperl and installed Embperl via perl -MCPAN -e shell.
> The only symptoms that I'm seeing are that
> $fdat{filetoupload} is not a valid filehandle
HTML::Embperl 1.3.x doesn't work with some recent changes in CGI.pm.
You either need a (small) hack or go for Embperl (v2) instead.
See the patches for my Debian libhtml-embperl-perl package if you
really want to use HTML::Embperl with perl 5.8.x:
http://http.us.debian.org/debian/pool/main/libh/libhtml-embperl-perl/libhtml-embperl-perl_1.3.6-2.diff.gz
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: build bug? [Fixed: use CGI.pm <= 3.0]
Posted by "troy d. straszheim" <tr...@resophonic.com>.
OK, that was it. There are still a number of errors in the test
output, I'm assuming these are not really errors but inconsistencies in
what the tests return from what the testing framework expects to see.
After rolling back to CGI.pm 3.0 things work again.
Thanks for the help...
-T
On Aug 21, 2004, at 1:36 PM, Gerald Richter wrote:
>>
>> Sorry I didn't understand the first time, again thanks for the help.
>>
>> Here's the output:
>>
>> #65 upload.htm...
>> Error in Line 17
>> Is: >----------<
>> Should: >f1=abc1<
>>
>
> Ok, so it's not a problem of your code. It looks like a problem with
> CGI.pm.
>
> Which version of CGI.pm you are using?
>
> Could you try an older version of CGI.pm (3.0 or 2.x, but not 3.01 and
> above).
>
> Gerald
>
>
>> -t
>>
>>
>> On Aug 20, 2004, at 5:28 PM, Gerald Richter wrote:
>>
>>>>
>>>> ERR: 24: Error in Perl code: bytes not defined: Bad file
>> descriptor
>>>> at ...
>>>>
>>>
>>> Does the upload test succeed, when you run
>>>
>>> make test TESTARGS="-i"
>>>
>>>
>>> Gerald
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
>>> For additional commands, e-mail: embperl-help@perl.apache.org
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: build bug?
Posted by Gerald Richter <ri...@ecos.de>.
>
> Sorry I didn't understand the first time, again thanks for the help.
>
> Here's the output:
>
> #65 upload.htm...
> Error in Line 17
> Is: >----------<
> Should: >f1=abc1<
>
Ok, so it's not a problem of your code. It looks like a problem with CGI.pm.
Which version of CGI.pm you are using?
Could you try an older version of CGI.pm (3.0 or 2.x, but not 3.01 and
above).
Gerald
> -t
>
>
> On Aug 20, 2004, at 5:28 PM, Gerald Richter wrote:
>
> >>
> >> ERR: 24: Error in Perl code: bytes not defined: Bad file
> descriptor
> >> at ...
> >>
> >
> > Does the upload test succeed, when you run
> >
> > make test TESTARGS="-i"
> >
> >
> > Gerald
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: build bug?
Posted by "troy d. straszheim" <tr...@resophonic.com>.
Sorry I didn't understand the first time, again thanks for the help.
Here's the output:
#65 upload.htm...
Error in Line 17
Is: >----------<
Should: >f1=abc1<
-t
On Aug 20, 2004, at 5:28 PM, Gerald Richter wrote:
>>
>> ERR: 24: Error in Perl code: bytes not defined: Bad file
>> descriptor at ...
>>
>
> Does the upload test succeed, when you run
>
> make test TESTARGS="-i"
>
>
> Gerald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: build bug?
Posted by Gerald Richter <ri...@ecos.de>.
>
> ERR: 24: Error in Perl code: bytes not defined: Bad file
> descriptor at ...
>
Does the upload test succeed, when you run
make test TESTARGS="-i"
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: build bug?
Posted by "troy d. straszheim" <tr...@resophonic.com>.
Na, danke for the swift reply...
Yes, forcing installation is no problem, and everything seems to work
fine, except for the file upload issue. .epl pages are correctly
generated u.s.w...
But somehow %fdat{uploadfilename}, as in the file upload examples, has
no valid filehandle associated with it. I see this from different
browsers on PC's on different networks. Would you have any suggestions
on how to debug this? It is not clear to me how to get another level
down into the code.
Thanks again,
-t
On Aug 20, 2004, at 1:56 PM, Gerald Richter wrote:
>> #12 error.htm...
>>
>> Expected 4 more error(s) in logfile
>>
>
> This is a problem with the changes in the format of the error of
> Apache. It
> is already solved in the current CVS version, which will be release
> soon as
> 2.0pre1. For now just go to the Embperl installation directory and say
>
> make test TESTARGS="-i"
>
> Then it will continue after an error. You can savely ignore all error
> of
> make test, that occurs during testing of error handling (i.e. test name
> someway has "error" in it)
>
> Gerald
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: build bug?
Posted by Gerald Richter <ri...@ecos.de>.
> #12 error.htm...
>
> Expected 4 more error(s) in logfile
>
This is a problem with the changes in the format of the error of Apache. It
is already solved in the current CVS version, which will be release soon as
2.0pre1. For now just go to the Embperl installation directory and say
make test TESTARGS="-i"
Then it will continue after an error. You can savely ignore all error of
make test, that occurs during testing of error handling (i.e. test name
someway has "error" in it)
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org