Mailing List Archive

apache/1.3.6 to lighttpd/2.2.0 issues
I'm moving things around, and since I'm doing that anyway, I decided to
move to 2.2.0. Now I'm seeing something rather unexpected:

Here's my epl file (I used the example from:
http://perl.apache.org/embperl/pod/doc/Embperl.-page-3-.htm#sect_2)

- @arr = (1, 3, 5) -]
[$ foreach $v @arr $]
[+ $v +] <BR>
[$ endforeach $]



my errors:
[21231]ERR: 32: Warning in Perl code: Array found where operator
expected at my.epl line 2, at end
of line

[21231]ERR: 32: Warning in Perl code: (Missing operator before ?)

[21231]ERR: 24: Error in Perl code: syntax error at
my.epl line 2, near "$v @arr "
syntax error at my.epl line
11, near ";

}"



Why is this a problem? Seems to be the basics are breaking here.

I'm running this with cgi with lighttpd. Since I couldn't get anythign
at all working with embpcgi.pl, I removed the line causing embpexec.pl
to die if used as CGI script, and all other aspects of it appear to be
fine. I did that approach because I don't know if there's an
apache/lighttpd difference in how the scripts are called. Btw, if I can
get this working, I'd be happy to write up how to use this with
lighttpd.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: apache/1.3.6 to lighttpd/2.2.0 issues [ In reply to ]
On Mon, Apr 24, 2006 at 11:18:24AM -0700, Daniel wrote:
> I'm moving things around, and since I'm doing that anyway, I decided to
> move to 2.2.0. Now I'm seeing something rather unexpected:
>
> Here's my epl file (I used the example from:
> http://perl.apache.org/embperl/pod/doc/Embperl.-page-3-.htm#sect_2)
>
> - @arr = (1, 3, 5) -]
> [$ foreach $v @arr $]
> [+ $v +] <BR>
> [$ endforeach $]

I wonder if this is another documentation issue, or just somethign weird
for me.

[- @arr = (1, 3, 5) -]
[$ foreach $v (@arr) $]
[+ $v +] <BR>
[$ endforeach $]

works fine. Note the added () around @arr.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: apache/1.3.6 to lighttpd/2.2.0 issues [ In reply to ]
>
> I'm moving things around, and since I'm doing that anyway, I
> decided to move to 2.2.0. Now I'm seeing something rather unexpected:
>
> Here's my epl file (I used the example from:
> http://perl.apache.org/embperl/pod/doc/Embperl.-page-3-.htm#sect_2)
>
> - @arr = (1, 3, 5) -]
> [$ foreach $v @arr $]

Needs to be

[$ foreach $v (@arr) $]

See http://perl.apache.org/embperl/pod/doc/README.v2.txt for what has
changed from 1.3 to 2.x

>
> I'm running this with cgi with lighttpd. Since I couldn't get
> anythign at all working with embpcgi.pl, I removed the line
> causing embpexec.pl to die if used as CGI script, and all
> other aspects of it appear to be fine. I did that approach
> because I don't know if there's an apache/lighttpd difference
> in how the scripts are called. Btw, if I can get this
> working, I'd be happy to write up how to use this with lighttpd.
>

I never have used lighttpd, so I don't know the difference. The difference
between the two scripts is maninly how they get passed the filename.

Gerald



** Virus checked by BB-5000 Mailfilter **


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: RE: apache/1.3.6 to lighttpd/2.2.0 issues [ In reply to ]
> > I'm running this with cgi with lighttpd. Since I couldn't get
> > anythign at all working with embpcgi.pl, I removed the line
> > causing embpexec.pl to die if used as CGI script, and all
> > other aspects of it appear to be fine. I did that approach
> > because I don't know if there's an apache/lighttpd difference
> > in how the scripts are called. Btw, if I can get this
> > working, I'd be happy to write up how to use this with lighttpd.
> >
>
> I never have used lighttpd, so I don't know the difference. The difference
> between the two scripts is maninly how they get passed the filename.

lighttpd doesn't use PATH_TRANSLATED.
I seem to have things working by doing $ENV{PATH_TRANSLATED} =
$ENV{SCRIPT_FILENAME};

is there a reason your script doesn't use SCRIPT_FILENAME in favor of
PATH_TRANSLATED?

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Re: RE: apache/1.3.6 to lighttpd/2.2.0 issues [ In reply to ]
On Fri, Apr 28, 2006 at 07:29:04AM -0700, Daniel wrote:
> > > I'm running this with cgi with lighttpd. Since I couldn't get
> > > anythign at all working with embpcgi.pl, I removed the line
> > > causing embpexec.pl to die if used as CGI script, and all
> > > other aspects of it appear to be fine. I did that approach
> > > because I don't know if there's an apache/lighttpd difference
> > > in how the scripts are called. Btw, if I can get this
> > > working, I'd be happy to write up how to use this with lighttpd.
> > >
> >
> > I never have used lighttpd, so I don't know the difference. The difference
> > between the two scripts is maninly how they get passed the filename.
>
> lighttpd doesn't use PATH_TRANSLATED.
> I seem to have things working by doing $ENV{PATH_TRANSLATED} =
> $ENV{SCRIPT_FILENAME};
>
> is there a reason your script doesn't use SCRIPT_FILENAME in favor of
> PATH_TRANSLATED?

I was too quick. that doens't work with passing vars at all. hmm.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: Re: RE: apache/1.3.6 to lighttpd/2.2.0 issues [ In reply to ]
> >
> > lighttpd doesn't use PATH_TRANSLATED.
> > I seem to have things working by doing $ENV{PATH_TRANSLATED} =
> > $ENV{SCRIPT_FILENAME};
> >
> > is there a reason your script doesn't use SCRIPT_FILENAME
> in favor of
> > PATH_TRANSLATED?
>

That is to support calling a script as
/cgi-bin/embpcgi.pl/path/to/embperl.page.epl



> I was too quick. that doens't work with passing vars at all. hmm.
>

What do you mean by "passing vars at all" ?

Maybe it help if you put something like

use Data::Dumper ;
open FH, ">/tmp/cgienv.log" ;
print Dumper (\%ENV) ;
close FH ;

At the top of embpexec.pl. That will shed some light how the environment is
setup and we should be able to adjust it.

Gerald



** Virus checked by BB-5000 Mailfilter **


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org