From: <php...@li...> - 2007-02-02 06:00:10
|
I'm trying to get 9.2 weblogic to work with the latest PHP Java Bridge on windows. I found the instructions for CGI on http://forums.bea.com/bea/thread.jspa?threadID=3D300000120&messageID=3D40= 000 3285, but I need this for a production system and I want to set it up without CGI. =20 Of course it would help if I were a weblogic expert (which I am not). I deployed it and set it up to the best of my ability and this is what I get as the response: java.lang.NullPointerException at java.net.URLEncoder.encode(Ljava.lang.String;Ljava.lang.String;)Ljava.la ng.String;(Unknown Source) at php.java.bridge.http.ContextFactory.addNext(ContextFactory.java:118) at php.java.bridge.http.ContextFactory.(ContextFactory.java:135) at php.java.bridge.http.SimpleContextFactory.(SimpleContextFactory.java:51) at php.java.servlet.ServletContextFactory.(ServletContextFactory.java:47) at php.java.servlet.ServletContextFactory.addNew(ServletContextFactory.java :76) at php.java.servlet.PhpCGIServlet$CGIEnvironment.setCGIEnvironment(PhpCGISe rvlet.java:289) at php.java.servlet.CGIServlet$CGIEnvironment.init(CGIServlet.java:559) at php.java.servlet.PhpCGIServlet.createCGIEnvironment(PhpCGIServlet.java:4 34) at php.java.servlet.CGIServlet.doGet(CGIServlet.java:448) at php.java.servlet.PhpCGIServlet.doGet(PhpCGIServlet.java:539) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(St ubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityH elper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2 83) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:1 75) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java:3214) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu bject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121 ) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServ letContext.java:1983) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletCont ext.java:1890) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java :1344) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManage rImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) Hopefully, someone can help me out. I'll keep at it until I get it, and suggestions are appreciated. =20 Thanks, Curtis Fisher Analyst/Software Developer, Application Solutions=20 Meridian IQ |
From: <php...@li...> - 2007-02-10 12:16:12
|
Hi, when your application server or servlet engine returns null for cfg.getRealPath(""), you cannot run PHP within your app server or servlet engine. This is either a bug in the bea application server or this server simply doesn't allow file access resources from the web context. Can you please open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233). Until then please use Apache or IIS as a front end or use another application server. For example Macromedia JRun, IBM WebSphere, Apache Geronimo, Sun Java AS ("Glassfish"), Tomcat, Caucho Resin. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2007-02-11 18:52:34
|
Hi, those who want to run the PHP/Java Bridge on the WebLogic application server need to implement their own getRealPath(). The WebLogic getRealPath() API is broken and always returns null. The following is a getRealPath() emulation which uses the getResource() API on WebLogic: /** * Identical to context2.getRealPath(pathInfoCGI). On BEA * WebLogic, which has a broken getRealPath() implementation, we * use context2.getResource(pathInfoCGI)) instead. * @param context2 The servlet context. * @param pathInfoCGI may be "" or "/" for example. * @return a valid path or null */ public static String getRealPath(ServletContext context2, String pathInfoCGI) { String ret = context2.getRealPath(pathInfoCGI); if(ret!=null) return ret; // The following is the workaround for BEA WebLogic boolean stripSlash=false; if(!pathInfoCGI.endsWith("/")) { stripSlash=true; if("".equals(pathInfoCGI)) pathInfoCGI = "/"; } URL url = null; try { url = context2.getResource(pathInfoCGI); } catch (MalformedURLException e) { Util.printStackTrace(e); return null; } if(!"file".equals(url.getProtocol())) return null; ret = url.getPath(); if(stripSlash&&ret.endsWith("/")) ret = ret.substring(0, ret.length()-1); return ret.replace('/', File.separatorChar); } ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |