Mailing List Archive

Too complex ??
Hi

Can a page become too complex for Embperl?

I've used some hours to track down errors in a web page I'm trying to convert
to Embperl. There's a lot of text, with headers, unordered lists, Italic,
center and so on.

There was a few bugs in the HTML code, but even if I correct that, I have some
strange results. A page can work perfectly until I reinsert a &nbsp; or an <I>
</I> pair.

Then the page hangs until I push the Stop button.

I just installed the latest Embperl from CPAN, and I'm using Embperlobjects.
What can I do to track the problem down?

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2582
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
Re: Too complex ?? [ In reply to ]
> Can a page become too complex for Embperl?

More:

The reason the page "hangs" is that Netscape is confused. Here's how it looks
from Lynx:

<<<<<<><<<>HTTP/1.1 200 OK Date: Sun, 09 Jul 2000 10:03:21 GMT Server:
Apache/1.3.12 (Unix) mod_perl/1.24 Content-Length: 4468 Connection:
close Content-Type: text/html; charset=iso-8859-1

The problem is of course the leading angle brackets. Something is going wrong,
and I can't see why. As I know, this will only happen if I use print, but
there's no print statement anywhere.

To make matters even worse, I discovered that the same page can load correctly
sometimes. Most of the time it returns these faulty angle brackets.

I'm using HTML-Embperl-1.3b3.

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2582
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
-------------------------------------------------------

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2582
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
RE: Too complex ?? [ In reply to ]
Hi
>
> Can a page become too complex for Embperl?
>

No, there are no limits (only the size of your swap file, but if you hit
this, something is properbly really going wrong)

[..]
> <<<<<<><<<>HTTP/1.1 200 OK Date: Sun, 09 Jul 2000 10:03:21 GMT Server:
> Apache/1.3.12 (Unix) mod_perl/1.24 Content-Length: 4468 Connection:
> close Content-Type: text/html; charset=iso-8859-1
>
> The problem is of course the leading angle brackets. Something is
> going wrong,
> and I can't see why. As I know, this will only happen if I use print,

Yes

> but
> there's no print statement anywhere.
>

Try setting optRedirectStdout. Does this change anything? If yes, there
_must_ be some Perl code, that writes to STDOUT (i.e. a print)

> To make matters even worse, I discovered that the same page can
> load correctly
> sometimes. Most of the time it returns these faulty angle brackets.
>

Strange, very strange. I never seen this before, only if you (or a module
you use) somewhere writes directly to STDOUT, instead using Embperl output
functions.

Gerald

P.S. I am out of office for the next 5 days, so I will not be able to answer
any mail before friday


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
RE: Too complex ?? [ In reply to ]
> No, there are no limits (only the size of your swap file, but if you hit
> this, something is properbly really going wrong)

Thought so, and my page is not really complex. But is is avery strange
behavior.

The same page can load correctly, and then later I get these angle brackets,
and vice versa.

At one point it seemed that if I changed anything in the base.tepl, then the
page would load. But then later, it did not :-(

> Try setting optRedirectStdout. Does this change anything? If yes, there
> _must_ be some Perl code, that writes to STDOUT (i.e. a print)

No change. I still get a loadful of <<<<<<<<<<<<<<<><<<<<<<><><<<<<<<<<><<<<<><<<<<<><<<>

> Strange, very strange. I never seen this before, only if you (or a module
> you use) somewhere writes directly to STDOUT, instead using Embperl output
> functions.

But it's a very simple page, Perl wise. I have a EmbperlObject base page where
there is a little Perl, but the main page is void of Embperl.

> P.S. I am out of office for the next 5 days, so I will not be able to answer
> any mail before friday

Hm, as always this is something that has to be solved quick.

But I'll send you the pages involved if you'll look at them when you come back.
Maybe there is a special situation here that my page stumbles on.

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2582
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
RE: Too complex ?? [ In reply to ]
> > P.S. I am out of office for the next 5 days, so I will not be
> able to answer
> > any mail before friday
>
> Hm, as always this is something that has to be solved quick.
>
> But I'll send you the pages involved if you'll look at them when
> you come back.
> Maybe there is a special situation here that my page stumbles on.
>

I use EmbperlObject very much in my own projects and never see this problem.

You can send me the pages and a take a look at them at the next weekend. Now
I turning my computer off for the next week :-)

Gerald
RE: Too complex ?? [ In reply to ]
Hi
>
> > I use EmbperlObject very much in my own projects and never see
> this problem.
>
> I may be doing something wrong, but I can't see it myself. Now
> this code is
> tested on two different servers with Embperl installed. I use
> Apache 1.3.12 and
> mod_perl 1.24
>

I have tried your page and it works here without problems.

There are two things I have noticed:

1.) $optRedirectStdout = 1;

You can't set this inside the page, you must set it in your httpd.conf,
because Embperl must know this before the request starts, e.g.

PerlSetEnv EMBPERL_OPTIONS 16384

2.) You don't send me the general.sub. I guess that file contains the
problem. If you comment the Execute ({inputfile => 'general.sub', import =>
1 }); out, does the problem still occurs?

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------