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 interpretor, but AFAIK every AOLserver connection thread does and must have a Tcl interpretor 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 addressbook 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.