I'd like to get back to an old topic, and I beg your indulgence. I have been reading threads on the subject from 2000-2001 which have shed some light, but wonder if someone could explain some basic questions. I should explain that I am running PHP 4.1.1 on Apache 1.3.23 webserver. I have Java extensions enabled in PHP as DSO (j2sdk1.4.0) and I also have Tomcat4 running as a plug-in servlet engine to Apache.
My basic challenge. I work in a PHP shop, and we want to call and retrieve data from a Java servlet.
- Can I kick off the servlet from my PHP script?
- If so, can I synchronize with it, so as to retrieve data from it?
- If not, how do I retrieve data from it? MySql?
- I have read about running PHP as a servlet, but this may open a whole can of worms. How straightforward is this? What happens when Apache gets a .php request? How does it know to start a PHP servlet? Does someone have an example of this?
Any information on these and other questions I forgot or don't know to ask would be greatly appreciated. I know some of you out there have already fought this battle.
TIA
Rich