|
From: <php...@li...> - 2009-03-06 22:18:14
|
SUCCESS!!! With MySQL extension at that :-) I copied C:/PHP to C:/Program Files/PHP, since that path is built in to either launcher or the servlet. Seems like I saw somewhere that you can actually provide a path to php-cgi as an init-parameter to the servlet. Summary: 1) JavaBridge.war (demo) has incorrect php-cgi binary, and uses php.ini from cgi directory. 2) JavaBridgeTemplate5433.war works better, but on Windows PHP must be installed in C:/Program Files/PHP (C:/PHP does not work, unless somehow init-parmas are changed in web.xml), extensions in C:/Program Files/PHP/ext. 3) Windows installation requires php.ini to be in C:\WINDOWS, unless you use the following registry key to put it somewhere else: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath. 4) Just for completeness, not a JavaBridge issue: Don't use PHP installer for Windows, doesn't provide everything. Instead get the binary distribution and unzip manually into C:/Program Files/PHP, add C:/Program Files/PHP into Windows Path, add PHPRC=C:/Program Files/PHP env var. Modify php.ini to change extensions_dir=C:/Program Files/PHP/ext Thanks all for the help, and HTH others! Shash On Fri, Mar 6, 2009 at 4:03 PM, Sasvata Chatterjee < sas...@gm...> wrote: > There maybe two problems. I deleted the .....\Tomcat-6.0\temp directory > just for the heck of it to see if the error message changed. Lo and behold, > I get an error message trying to find php-cgi. I have checked using both > Cygwin and the Command Prompt, that php.exe and php-cgi.exe is in the path. > But looks like launcher.exe is looking for an explicit path to php-cgi.exe: > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > javax.servlet.ServletException: An IO exception occured. Probably php was > not installed as "/usr/bin/php-cgi" or "c:/Program Files/PHP/php-cgi.exe" > or > "C:\ASF\Tomcat-6.0\webapps\JavaBridgeTemplate5433\WEB-INF\cgi\php-cgi-x86-windows[.sh]|[.exe]". > Please see "php_exec" in your WEB-INF/web.xml and WEB-INF/cgi/README for > details. > php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:361) > php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > root cause > > java.io.IOException: Cannot run program "php-cgi" (in directory > "C:\Documents and Settings\sasvatac"): CreateProcess error=2, The system > cannot find the file specified > java.lang.ProcessBuilder.start(Unknown Source) > java.lang.Runtime.exec(Unknown Source) > php.java.bridge.Util$Process.start(Util.java:903) > php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1005) > php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1060) > > php.java.servlet.PhpCGIServlet$CGIRunner.execute(PhpCGIServlet.java:248) > php.java.servlet.CGIServlet.handle(CGIServlet.java:401) > php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350) > php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > root cause > > java.io.IOException: CreateProcess error=2, The system cannot find the file > specified > java.lang.ProcessImpl.create(Native Method) > java.lang.ProcessImpl.<init>(Unknown Source) > java.lang.ProcessImpl.start(Unknown Source) > java.lang.ProcessBuilder.start(Unknown Source) > java.lang.Runtime.exec(Unknown Source) > php.java.bridge.Util$Process.start(Util.java:903) > php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1005) > php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1060) > > php.java.servlet.PhpCGIServlet$CGIRunner.execute(PhpCGIServlet.java:248) > php.java.servlet.CGIServlet.handle(CGIServlet.java:401) > php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350) > php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > note The full stack trace of the root cause is available in the Apache > Tomcat/6.0.18 logs. > Apache Tomcat/6.0.18 > > On Fri, Mar 6, 2009 at 3:52 PM, Sasvata Chatterjee < > sas...@gm...> wrote: > >> Thanks guys for the help (sorry, if you don't type your name in the >> message, I see the sender as "php-java-bridge-user" :-). So far still not >> much luck. >> >> Brad, I tried copying the php_bz2.dll into the cgi directory and changing >> "extension_dir=.". No go. >> >> I deleted JavaBridge, and put JavaBridgeTemplate5433.war and tried it. I >> get the following error, the pipe is not found: >> >> java.io.FileNotFoundException: \\.\pipe\C:\ASF\Tomcat-6.0\temp\JavaBridge5440005472872131044.socket (All pipe instances are busy) >> >> >> *type* Exception report >> >> *message* >> >> *description* *The server encountered an internal error () that prevented >> it from fulfilling this request.* >> >> *exception* >> >> javax.servlet.ServletException: PHP FastCGI server failed, switching off FastCGI SAPI. >> >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:389) >> php.java.servlet.CGIServlet.handle(CGIServlet.java:401) >> php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350) >> >> php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) >> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:617) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> >> *root cause* >> >> php.java.servlet.fastcgi.ConnectException >> php.java.servlet.fastcgi.NPChannelName.doConnect(NPChannelName.java:50) >> >> >> php.java.servlet.fastcgi.NPChannelName.connect(NPChannelName.java:54) >> php.java.servlet.fastcgi.FastCGIServlet$1.connect(FastCGIServlet.java:152) >> php.java.servlet.fastcgi.ConnectionPool$Connection.reopen(ConnectionPool.java:101) >> >> >> php.java.servlet.fastcgi.ConnectionPool.openConnection(ConnectionPool.java:200) >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:421) >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:374) >> >> >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:382) >> php.java.servlet.CGIServlet.handle(CGIServlet.java:401) >> php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350) >> php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) >> >> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:617) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> >> *root cause* >> >> java.io.FileNotFoundException: \\.\pipe\C:\ASF\Tomcat-6.0\temp\JavaBridge5440005472872131044.socket (All pipe instances are busy) >> >> >> java.io.RandomAccessFile.open(Native Method) >> java.io.RandomAccessFile.<init>(Unknown Source) >> java.io.RandomAccessFile.<init>(Unknown Source) >> php.java.servlet.fastcgi.NPChannelName.doConnect(NPChannelName.java:48) >> >> >> php.java.servlet.fastcgi.NPChannelName.connect(NPChannelName.java:54) >> php.java.servlet.fastcgi.FastCGIServlet$1.connect(FastCGIServlet.java:152) >> php.java.servlet.fastcgi.ConnectionPool$Connection.reopen(ConnectionPool.java:101) >> >> >> php.java.servlet.fastcgi.ConnectionPool.openConnection(ConnectionPool.java:200) >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:421) >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:374) >> >> >> php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:382) >> php.java.servlet.CGIServlet.handle(CGIServlet.java:401) >> php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350) >> php.java.servlet.CGIServlet.doGet(CGIServlet.java:471) >> >> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:617) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> >> >> >> On Fri, Mar 6, 2009 at 1:04 PM, < >> php...@li...> wrote: >> >>> Only binaries located in web-inf/cgi use that path. >>> >>> System executables are launched from home dir as cwd and w/o any special >>> path or setting. >>> >>> >>> >>> php...@li... wrote: >>> >>> >>One hint is that when I start php-cgi by hand, it uses >>> "C:/Windows/php.ini" >>> >>but when started by launcher.exe by the bridge it uses >>> >>"C:/....../webapps/JavaBridge/WEB-INF/cgi/php.ini" >>> > >>> >Is there a simple setting to make the launcher use the other php.ini? >>> >Please post your ultimate solution if/when you figure this out and get >>> it >>> >working. >>> >thx, -Brad- >>> >>> >------------------------------------------------------------------------------ >>> >Open Source Business Conference (OSBC), March 24-25, 2009, San >>> Francisco, CA >>> >-OSBC tackles the biggest issue in open source: Open Sourcing the >>> Enterprise >>> >-Strategies to boost innovation and cut costs with open source >>> participation >>> >-Receive a $600 discount off the registration fee with the source code: >>> SFAD >>> >http://p.sf.net/sfu/XcvMzF8H >>> >_______________________________________________ >>> >php-java-bridge-users mailing list >>> >php...@li... >>> >https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >>> >>> ------------------------------------------------------------------------------ >>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, >>> CA >>> -OSBC tackles the biggest issue in open source: Open Sourcing the >>> Enterprise >>> -Strategies to boost innovation and cut costs with open source >>> participation >>> -Receive a $600 discount off the registration fee with the source code: >>> SFAD >>> http://p.sf.net/sfu/XcvMzF8H >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >>> >> > |