You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by andrew <aa...@infonn.ru> on 2006/02/24 11:56:10 UTC

cgi problem

Hi,
Can somebody help with such problem:
there is perl's "PHP" library for using php functions in perl.
Unfortunately, I couldn't compile libphp5 module for apache with
--enable-embed option (enable building of embedded SAPI library necessary
for this lib)
simultaneously with apache handler.

And because I can't run this library from embperl/modperl mode and use
it from perl only now.

Can I run some functions of this library from Embperl by process them of
usual perl interpretator (cgi-mode in fact) and return back reference of
hash or another values? may be by using external storing method?
Or may be exist more simple method in Embperl?

---
Thanks
Andrew Antipin


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


RE: cgi problem

Posted by Gerald Richter <ri...@ecos.de>.
> 
> So, may be exist external method of data exchange between 
> perl-cgi and embperl?
> 

It's not special to Embperl, but you can use storable to save your data in a
file and read it inside your Embperl page, but I guess this will not be much
faster, because the overhead of using a cgi is much more, that the time you
need to parse your output (in most cases).

To get it really fast you would really need to recompile PHP with --embed
(or maybe other options), but I don't have any experiences with this

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: cgi problem

Posted by Andrew <aa...@infonn.ru>.
> So I think you want to call some php code from embperl..
> You can do this in Embperl2/apache2 by using a "subrequest".
>  [- Execute({subreq => '/path/myscript.php'}) -]
> You can then use all the usual Execute `output', etc options to
> manipulate the output.

Sorry, no. I want to use some php library functions from www.freepbx.org
project for creating voip devices.
And some of these functions return arrays.
now I found out how to execute my perl cgi code and process php return
values:
I use /cgi-bin/embpcgi.pl/my/perl/code subrequest, process php return values
there and return only simple scalar value to Execute 'output'.
But, first, it is long time process to execute cgi code and especially
process big subrequest output.
Second, I want to use these php arrays in embperl...
Of course, better if I could compile "--enable-embed" php feature with
apache, but...

So, may be exist external method of data exchange between perl-cgi and
embperl?

Thank you
Andrew


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