From: <php...@li...> - 2007-07-25 17:46:04
|
Hello, this is my first post in this thread. I install the bridge (php-java-bridge_3.2.1a_j2ee) on Tomcat 4.1 / Java 1.5.0 / Apache 2.2 / PHP 5.2.3 The install was a little bit difficult, but now its works fine. Thank for the mailing-list and project homepage. My Question. I have a php-based cms system (typo3) and a webapplication (pure java) it is running under tomcat. Both works and in the typo system i can instatiate java objects. Fine! Every request goes first to the index.php in the cms. I need a mechanism to call an servlet in the other pure java-webapp. (i would like to track referer/parameters e.g. in this app) I know the mechanism to intantiate java objects via java_require('any.jar'), but how call a servlet in a other tomcat container? (perhaps a beginer question) regards joersch |
From: <php...@li...> - 2007-07-25 20:11:07
|
Hi, [please excuse the delay] > I know the mechanism to intantiate java objects via > java_require('any.jar'), but how call a servlet in a other tomcat > container? do you want to call a servlet from another web application or a different container? The former is possible by using the RequestDispatcher, please see http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html Regards, Jost Boekemeier Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail |
From: <php...@li...> - 2007-07-26 09:23:29
|
Hi Jost, >do you want to call a servlet from another web application or a different container? > > i dont know exacly what you mean with another web application. I have a Apache / Tomcat (mod_jk). First webapp is a pure php-system (typo3 cms). The requests is not forwarding via mod_jk to the tomcat. In this webapp i install the bridge (WebInf Folder and java folder from the JavaBridge.war). The second app is located in the tomcat. All requests (/jsp) goes via mod_jk to the context in the tomcat. The second app implements a HttpServlet. Every request from the first app (typo3 cms) should be also call the doGet Method in the second Application. This method retrieve the parameters and use it. But the response is generated by the first app, the cms system. regards Jörg >The former is possible by using the RequestDispatcher, please see >http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html > > >Regards, >Jost Boekemeier > > > > Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail > >------------------------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. >Still grepping through log files to find problems? Stop. >Now Search log events and configuration files using AJAX and a browser. >Download your FREE copy of Splunk now >> http://get.splunk.com/ >_______________________________________________ >php-java-bridge-users mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > |
From: <php...@li...> - 2007-07-26 10:33:59
|
Hi Jörg, first of all thank you very much for your feedback. > i dont know exacly what you mean with another web application. I assumed that you wanted to connect your framework (typo3) with another, java-based framework running in a different web context, but within the same tomcat container. > I have a > Apache / Tomcat (mod_jk). First webapp is a pure php-system (typo3 cms). > The requests is not forwarding via mod_jk to the tomcat. In this webapp > i install the bridge (WebInf Folder and java folder from the > JavaBridge.war). The second app is located in the tomcat. All requests > (/jsp) goes via mod_jk to the context in the tomcat. The second app > implements a HttpServlet. Every request from the first app (typo3 > cms) should be also call the doGet Method in the second Application. > This method retrieve the parameters and use it. But the response is > generated by the first app, the cms system. 1) So you have typo3 running in the Apache front-end connected to an associated back-end running in tomcat. 2) A second, unspecified application is running in tomcat, associated with the Apache front-end via mod_jk. The second application should parse the request parameters and call the first application which should generate the response. Isn't it possible to direct all requests to the second app and then use requestDispatcher.forward(...) to let typo 3 generate the response? The call graph would be: apache --mod_jk-> tomcat app#2 --forward-> php/java bridge -> response Regards, Jost Boekemeier dddd |
From: <php...@li...> - 2007-07-26 18:19:51
|
Hi Jost, thank a lot for your feedback. >I assumed that you wanted to connect your framework (typo3) with another, >java-based framework running in a different web context, but within the same >tomcat container. > > yes, >1) So you have typo3 running in the Apache front-end connected to an associated back-end >running in tomcat. > > yes >2) A second, unspecified application is running in tomcat, associated with the Apache >front-end via mod_jk. > > > yes >The second application should parse the request parameters and call the first application which >should generate the response. > >Isn't it possible to direct all requests to the second app and then use >requestDispatcher.forward(...) to let typo 3 generate the response? > >The call graph would be: > > apache --mod_jk-> tomcat app#2 --forward-> php/java bridge -> response > > > this is a great idea. i think this could be the solution. The prerequisite is that the php-webapp is correct running via the bridge in the tomcat. unfortunately runs the php-app not in the tomcat. I reduced my system to the absolutly mimimum. I installed php version 5.2.3. If i configure the system as you decribe in PHP5, PHP/Java Bridge & Apache on XP PRO + SP2 and examples (http://www.dsl.uow.edu.au/~sk33/php5java.htm) the Bridge is running and if i call phpinfo then i see the correct version 5.2.3 If i configure as PHP5, PHP/Java Bridge & Tomcat on XP PRO + SP and examples (http://www.dsl.uow.edu.au/~sk33/php5jsp.htm) the bridge isnt running. In this case, i wondering the the php version is 5.1.3-dev. why used this install not the installed version? A question to you, it is posible to get you as consultand to solve this case in our project? best regards Jörg >Regards, >Jost Boekemeier > > > > dddd > >------------------------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. >Still grepping through log files to find problems? Stop. >Now Search log events and configuration files using AJAX and a browser. >Download your FREE copy of Splunk now >> http://get.splunk.com/ >_______________________________________________ >php-java-bridge-users mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > |
From: <php...@li...> - 2007-07-27 14:36:36
|
Hi Jost, one more info for the behavior. >If i configure as PHP5, PHP/Java Bridge & Tomcat on XP PRO + SP and >examples (http://www.dsl.uow.edu.au/~sk33/php5jsp.htm) >the bridge isnt running. In this case, i wondering the the php version >is 5.1.3-dev. why used this install not the installed version? > > > The php version they used issnt the same as i installed. I installed 5.2.3 in C:\Programs\PHP\php. If i run php-info i see that C:\Programs\PHP\php.ini is used, but the version is 5.1.3-dev I think the version they be used is located in the cgi folder!? But some librarys can`t loaded: may logfile: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Programs\PHP\ext\php_imagick.dll' - Die angegebene Prozedur wurde nicht gefunden. This dll is present and the folder is correct. (It works without the bridge) What is the reason? best regards Jörg |
From: <php...@li...> - 2007-07-27 16:00:30
|
Hi Jörg, > 5.2.3 in C:\Programs\PHP\php. If i run php-info i see that > C:\Programs\PHP\php.ini is used, but the version is 5.1.3-dev I think > the version they be used is located in the cgi folder!? PHP > 5.2 now prefers the php.ini from the current ("cgi") folder over the system php.ini. Please remove this file from the cgi folder. Version 4.2.1 and above change the current working directory when the system php executable is used to avoid this problem. Regards, Jost Boekemeier __________________________________ Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever |
From: <php...@li...> - 2007-07-27 16:14:14
|
Hi Jörg, > unfortunately runs the php-app not in the tomcat then you'll need to use the JSR223 interface to call your PHP scripts running in the web server. This will not necessarily slower than a PHP FastCGI server attached to the web context, but certainly much more inconvenient as it requires an external web server and that the web server is configured to run PHP. Regards, Jost Boekemeier __________________________________ Alles was der Gesundheit und Entspannung dient. BE A BETTER MEDIZINMANN! www.yahoo.de/clever |
From: <php...@li...> - 2007-07-27 17:20:01
|
Hi Jost, thanks for all your answers. I follow your last answer and i delete the php.ini in the cgi folder. The same behavior. Then i upgrade the bridge from 3.2.1a to 4.2.1. But unfortunately i cant find the java-x86-windows.dll for copy into the php/ext folder. Then i take the php-4-java-x86-windows.dll and renamed it to php_java.dll. This is not working. I am afraid it is incorrect what i done. ok. >then you'll need to use the JSR223 interface to call your PHP scripts running in the web server. >This will not necessarily slower than a PHP FastCGI server attached to the web context, but >certainly much more inconvenient as it requires an external web server and >that the web server is configured to run PHP. > > > i dont know it is the best way. I see the php-webapp running in my apache. i see also a call into java. I thought, wow it is great. I'm afraid i need now help from professionals. I dont know it is ok i ask in this forum - Can you help me as professional-consultant to solve the problem? regards Jörg |
From: <php...@li...> - 2007-07-28 12:09:50
|
Hi Jörg, > [delete the] php.ini in the cgi folder. The same behavior. have you restarted tomcat? > Then i upgrade the bridge > from 3.2.1a to 4.2.1. But unfortunately i cant find the > java-x86-windows.dll for copy into the php/ext folder. You don't need a dll. The PHP/Java Bridge is written in pure PHP and pure Java. Please see the README for details. Only PHP 4 needs such a dll, because it implements certain features which were not available in PHP 4 and earlier versions. Regards, Jost Boekemeier dddd |
From: <php...@li...> - 2007-07-30 10:40:41
|
Hi Jost, >>[delete the] php.ini in the cgi folder. The same behavior. >> >> > >have you restarted tomcat? > > > i restarted the machine. > > >>Then i upgrade the bridge >>from 3.2.1a to 4.2.1. But unfortunately i cant find the >>java-x86-windows.dll for copy into the php/ext folder. >> >> > >You don't need a dll. The PHP/Java Bridge is written in pure PHP and pure Java. >Please see the README for details. > > i read this i the documentation: http://www.dsl.uow.edu.au/~sk33/php5jsp.htm PHP 5 & Java Bridge 3. Copy java-x86-windows.dll from the JavaBridge.war to C:\PHP\ext 4: Rename java-x86-windows.dll (from C:\PHP\ext) to php_java.dll Is this docu not correct? (linked from the http://php-java-bridge.sourceforge.net/pjb/examples.php site) regards Jörg |
From: <php...@li...> - 2007-07-30 13:25:19
|
Hi Jörg, > >>[delete the] php.ini in the cgi folder. The same behavior. > >have you restarted tomcat? > i restarted the machine. Then you need to find out why your system PHP still loads the wrong php.ini. Please use our bug tracker, if you need assistence. => http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233 > 3. Copy java-x86-windows.dll from the JavaBridge.war to C:\PHP\ext > 4: Rename java-x86-windows.dll (from C:\PHP\ext) to php_java.dll > > Is this docu not correct? No. The relevant 4.x documentation is contained in the download archive. > (linked from the http://php-java-bridge.sourceforge.net/pjb/examples.php > site) This documentation describes the latest stable version, which is version 3.2.1. Regards, Jost Boekemeier dddd |