You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Ben Kim <be...@yahoo.com> on 2005/12/20 00:32:49 UTC

Executing a cgi script

I'm on Perl 5.8.7, Embperl 2.1.0, Mod_perl 2.0.2 on
Apache 2.0.55 on
Solaris. 

I'm trying to Execute a cgi script from an epl page,
but the cgi script doesn't get executed (rather, it's
read as a text file.) Is there an option to make this
possible?

1) a.cgi submits data to b.epl

2) b.epl has only the following lines.
<h1>Reading files ... Please wait. </h1>
[$ hidden $] 
[- Execute ("a.cgi") -] 

3) data will be shown by a.cgi, eventually

In fact this epl file is going in between two
instances of one same cgi scripts. i.e. 
a.cgi submits data to b.epl, this executes a.cgi.

The purpose of inserting b.epl is to show a "wait"
screen. I guess I could use Ajax here but 

Is there a better way in cgi/embperl? 


Thanks.

Ben

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


RE: Executing a cgi script

Posted by Gerald Richter <ri...@ecos.de>.
> 
> I'm on Perl 5.8.7, Embperl 2.1.0, Mod_perl 2.0.2 on Apache 
> 2.0.55 on Solaris. 
> 
> I'm trying to Execute a cgi script from an epl page, but the 
> cgi script doesn't get executed (rather, it's read as a text 
> file.) Is there an option to make this possible?
> 
> 1) a.cgi submits data to b.epl
> 
> 2) b.epl has only the following lines.
> <h1>Reading files ... Please wait. </h1> [$ hidden $]
> [- Execute ("a.cgi") -] 
> 

The Execute will be handled in the same request, so your browser will only
see the result, when a.cgi has finished and that's not what you want to.

Instead you to to tell your browser to make a new request to a.cgi, so I
normaly use:

<h1>Reading files ... Please wait. </h1> 
<meta http-equiv="refresh" content="0:[+ $fullurl +]"> 

Note that $fullurl must include the a.cgi and all parameter you normaly
would pass with [$ hidden $] appended after a '?'

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