Forum OpenACS Development: Re: Tcl calls from PHP?

3: Re: Tcl calls from PHP? (response to 1)
Posted by Andrew Piskorski on
Malte, does that not entirely depend on what APIs the AOLserver PHP module makes available?

From your question I take it PHP does not have a convenient interface for making calls to the Tcl interpreter, but AFAIK every AOLserver connection thread does and must have a Tcl interpreter whether you use it for much of anything or not, so Tcl is there to be called.

I am entirely unfamiliar with PHP and its implementation in AOLserver, but if you are able to extend it in C, worst case you should be able to set up a C function which lets you call arbitrary Tcl commands (via Tcl_Eval). But there may be better or easier ways than that, of course. I'd ask on the AOLserver list before hacking in something like that myself.

4: Re: Tcl calls from PHP? (response to 3)
Posted by Malte Sussdorff on
Andrew, thanks for your reply, will ask over at the AOLserver list. I'm not even sure if it is futile effort, but with so many good PHP applications out there that would make an OpenACS installation look considerably better, interaction between both worlds seems like a good thing to me .

What I could envision e.g. for the moment is to use a PHP address book functionality in OpenACS and redirect the Database inserts (and reads, maybe) through Tcl API, so both OpenACS and the PHP address book could add items, but you could view it quickly in a list-builder page (which is easy to generate).

I'm tossing out ideas here at the moment with a huge potential for trouble, but, as a matter of fact, OpenACS lacks functionality in a number of occasions, where (specialized) PHP products are further advanced. It is just a question of how to integrate these best.

7: Re: Tcl calls from PHP? (response to 4)
Posted by Rocco Siffredi on
If someone has a example of this ( Tcl calls from php), please, I need it.