|
From: <php...@li...> - 2009-01-08 08:52:43
|
Hi, Thanks for the reply. >> java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, allow_url_include=On, /home/tomcat/webapps/test.php]), please check if php-cgi is in the path. >>> The above message means that the bridge functionality could not be checked. The bridge may or may not run on your operating system. (In 99% of all cases it will run without problems, it's just that we could not verify this because PHP is not installed). But PHP is installed as FastCGI? I have been using it to test various scripts, and the config php.ini file reports that everything is running OK. I think that the error means that the system cannot find the php-cgi binary, which resides in /home/php-fcgi/bin/php-cgi. Maybe there is no system PATH set to the php-cgi binary file. Could that not be the reason for this error? Surely the system has to know where to find the binary php-cgi file for this test to work? Please advise. >>> Why do you deploy the bridge before or while testing it? Please re-read the INSTALL.J2EE document I have read that document. Do I not need to deploy the bridge for testing???? It says to do this here: The PHP/Java Bridge can be installed with one copy operation: * the JavaBridge.war (renamed to "myPhpApp.war") should be copied into the autodeploy folder of the J2EE server. So thats what I did, and tested the examples such as Hello, JSR, Excel test etc over the web. Which part of the document do I need to refer to for testing then? any help would be great. Kind regards ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----- Original Message ----- From: Jonathan Pilling To: php...@li... Sent: Wednesday, January 07, 2009 5:02 PM Subject: php-cgi error on bridge startup: please check if php-cgi is in the path. Hi, > java -classpath JavaBridge.war TestInstallation > java.lang.RuntimeException: Could not run PHP ([php-cgi, Please install PHP properly. A php-cgi is an integral part of a PHP installation. The above message means that the bridge functionality could not be checked. The bridge may or may not run on your operating system. (In 99% of all cases it will run without problems, it's just that we could not verify this because PHP is not installed). > However, within my Tomcat webapps folder some new files Why do you deploy the bridge before or while testing it? Please re-read the INSTALL.J2EE document. > And my Tomcat installation uses port 8080, so why does it > say the bridge starts on 8081? The test uses port 8081 because there's another server already listening on 8080. Regards, Jost Boekemeier ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hi there, I ran this command from the terminal to test the php-java bridge installation: java -classpath JavaBridge.war TestInstallation I got the following information followed by an error: Starting a simple servlet engine: [/home/java/jre/bin/java, -jar, /home/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8081] Jan 07 16:48:41 VMBridge INFO : VM : 1.6.0@http://www.ibm.com/ Jan 07 16:48:41 VMBridge INFO : VMBridge version : 5.4.2 Jan 07 16:48:41 VMBridge INFO : logFile : Jan 07 16:48:41 VMBridge INFO : default logLevel : 3 Jan 07 16:48:41 VMBridge INFO : socket : SERVLET_LOCAL:8081 Jan 07 16:48:41 VMBridge INFO : java.ext.dirs : /home/java/jre/lib/ext Jan 07 16:48:41 VMBridge INFO : php.java.bridge.base: /root Jan 07 16:48:41 VMBridge INFO : thread pool size : 20 Jan 07 16:48:41 VMBridge INFO : JavaBridgeRunner started on port INET_LOCAL:8081 Invoking php: [php-cgi, -n, -d, allow_url_include=On, /home/tomcat/webapps/test.php] java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, allow_url_include=On, /home/tomcat/webapps/test.php]), please check if php-cgi is in the path. at TestInstallation.start(TestInstallation.java:327) at TestInstallation.main(TestInstallation.java:251) Caused by: java.io.IOException: Cannot run program "php-cgi": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:470) at java.lang.Runtime.exec(Runtime.java:604) at java.lang.Runtime.exec(Runtime.java:520) at TestInstallation.start(TestInstallation.java:325) ... 1 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:197) at java.lang.ProcessImpl.start(ProcessImpl.java:101) at java.lang.ProcessBuilder.start(ProcessBuilder.java:463) ... 4 more However, within my Tomcat webapps folder some new files were created after I did the above. An ext/ directory containing jar files, a result.html file and a log file were created. Does the error indicate that the path to the php-cgi binary is not set? If so, how can I correct this? And my Tomcat installation uses port 8080, so why does it say the bridge starts on 8081? Kind regards This message has been scanned for viruses by MailControl - www.mailcontrol.com |