You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by David Pickens <ds...@rci.rutgers.edu> on 2001/08/24 17:27:42 UTC

Apparent Caching problem

I have a recurring problem with both the stable and CVS development
versions of Embperl, where pages aren't served correctly on Apache
startup, but simply modifying the utime (date modified) settings using
perl's utime, GNU touch, or even opening and saving the file again without
changes, leads Emperl to work correctly.

I have this with several pages, but will give a short sample to
illustrate:

[- Execute( {inputfile => 'gs_banner.inc', import =>1} ); -]
[- Execute( {inputfile => 'common_funcs.inc', import => 1} ); -]
[- display_banner -]
[- gs_init -]
[- check_password -]
[- sidebar -]

     {... some code here ...}

[- display_end -]


In that example, everything BUT the code in the middle works OK (in other
words, the banner is displayed, the password is checked, the side bar is
printed but nothing is shown from the top-level page).  When I update the
utime on the top-level file, suddenly the HTML and code in the middle is
handled correctly.

Any advice on how to fix this?

I tried, as a hack, putting some code in startup.pl to update the date
modified on the files, but it doesn't help because it seems to do this too
early in the startup process.

I am using:
Apache 1.3.20 (SSL, mod_perl)
CVS Embperl
Windows 2000
ActivePerl

I had this problem w/ the stable Embperl tree, and the binary distribution
of Apache 1.3.12/mod_perl/perl.

Thanks,

David Pickens



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


Re: Apparent Caching problem

Posted by Gerald Richter <ri...@ecos.de>.
>
> I can send a short page that suffers from the problem either privately, or
> on the list.
>

Could you send me the example privatly, along with a embperl.log file of a
working and of a failing request. Please set EMBPERL_DEBUG at least to 2285

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 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




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


Re: Apparent Caching problem

Posted by David Pickens <ds...@rci.rutgers.edu>.
On Mon, 27 Aug 2001, Gerald Richter wrote:

> > In that example, everything BUT the code in the middle works OK
> 
> If you replace the whole code in the middle by something really simple e.g.
> 
> [+ "Hello" +]
> 
> does it work then correctly ?

Some pages with the same general structure (calling the same imported
functions) do work correctly each time, so the answer to this question is
that I can get simple examples to work correctly.


> 
> If you say it doesn't work, what is happening. The code is ignored ? an
> error is displayed ? the wrong code is executed ?

I did some crude testing with text markers to see what was being executed,
and what wasn't.  I have a basic if-then-else looking at some parameters
to determine what to display, so I put some text between the correct [$
else $] and [$ endif $].  That text appears in the HTML source, but the
call to the subroute immediately beneath it doesn't produce any output
until the time is modified on the file:

[$ else $]
 <!-- Correct -->
  [- fellowship_listing -]
[$ endif $]

This returns the comment tag in the HTML, but it doesn't seem to get into
the fellowship_listing subroutine.  That subroutine contains some embeded
code, but it also contains 'plain' HTML -- and that isn't returned either.  
I haven't seen any errors in the embperl log, and the footer subroutine
from the imported file produces the correct close tags at the end of the
file.  I'm just a little puzzled about why the subroutine would fail to
produce any output when first evaluated, but would work OK once the file
appears to be modified.

I can send a short page that suffers from the problem either privately, or
on the list.

David
 


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


Re: Apparent Caching problem

Posted by Gerald Richter <ri...@ecos.de>.
> In that example, everything BUT the code in the middle works OK

If you replace the whole code in the middle by something really simple e.g.

[+ "Hello" +]

does it work then correctly ?

If you say it doesn't work, what is happening. The code is ignored ? an
error is displayed ? the wrong code is executed ?

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 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



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