From: <php...@li...> - 2007-08-13 17:19:13
|
Hi .. I'm (primarily) a Java J2EE developer, working on a project to integrate JAAS security authentication with PHP authentication using WebSphere. Hope to produce a Drupal module if successful; time will tell. If things go well, one result will be some documentation of the process, necessarily limited by my understanding of the JavaBridge and PHP, both hopefully growing, and possibly a journal article or two. I've posted preliminaries of the first couple of steps as blog entries at http://dorsetwest.com (specifically http://www.dorsetwest.com/node/34). I'd be grateful for any review by more experienced users of the bridge, now and as this moves along so I can catch my errors and misunderstandings. In the comments that follow I'm using the August 7 build of JavaBridge. One understanding I'm trying to check relates to the purpose and use of the php_java.dll (which I think is what Jost means by the C-based extension module ... is this correct?) or alternately the "pure PHP PHP/Java Bridge classes" which I can't identify in code. Have I correctly identified the C-based extension? Where do the pure PHP PHP/Java Bridge classes reside, and are they PHP classes or Java Classes? I find, for example, that on a windows platform with: * No particular Apache extensions other than enabling PHP 5.2 (installed with MySQL and an image package only), * A JavaBridge servlet running on my WAS server, * Apache configured to route Java-bound URL's to the servlet engine by means of the WebSphere plugin, That an attempt to access a Java session from a PHP script residing entirely in the Apache home directory (invisible to servlet) works quite well so long as the critical include directly references the servlet, e.g. if(!extension_loaded('java')) require_once("http://localhost:9080/JavaBridge/java/Java.inc"); Does this mean: 1. Neither the C nor pure PHP extensions are needed any longer on the Apache/PHP side? I did see an "optional" post by Jost on this list, but wasn't sure what the effect of inclusion or non-inclusion at the Apache/PHP level had. I'm aware that the Java side is doing PHP work using its internal PHP interpreter 2. The C or PHP extensions are needed, and are included or referenced by some mechanism I haven't figured out yet, or 3. I'm missing a basic understanding? I do note that interpreting PHP through the bridge, e.g. running a PHP script that accesses a Java session, using the URI JavaBridge/myScript.php is very slow, e.g. 5seconds where JSP is about 1 second, but that running the same PHP script directly in Apache, even though it still references a java session (but only for a single call I think) is very fast, less than a second. I attribute that to the improved efficiency of the PHP/Apache collaboration and threading ... does that make sense? Would adding the C or Pure PHP classes affect these kinds of performance issues? Help is welcome ... I've got a few other questions, but will put them in another post for clarity. |