RE: PHP servlet
First thing, you have to be able to run PHP from the command line. It must be in path for Orion to find it. I hope this helps... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Simon Stewart Sent: Friday, February 22, 2002 1:46 PM To: Orion-Interest Subject: PHP servlet Has anyone out there managed to get PHP 4.1.1 to compile as a servlet and work with Orion? It compiles and I can install it, but any attempt to access a PHP document throws an Unexpected Exception, and you get a couple of screenfuls of backtrace from the JVM. To compile PHP use something like ./configure --with-java --with-servlet and then copy the phpsrvlt.jar to orion/lib and add the directory with the libphp4.so to either LD_LIBRARY_PATH or your /etc/ld.so.conf depending on what you're using. I'm using Orion 1.5.2, PHP 4.1.1 and the JDK 1.4 on Linux (debian unstable, kernel version 2.4.17) but a quick google reveals that this is a problem on other platforms.
RE: PHP servlet problems
Thanks Sean. That's exactly the setup I'm running, I've tried swapping the CGIServlet for the php one but still the same result. Any more ideas would be appreciated. Tim. -Original Message- From: Sean Leach [mailto:[EMAIL PROTECTED]] Sent: 14 November 2000 16:02 To: Orion-Interest Subject: RE: PHP servlet problems I have it setup and running fine, I use: servlet servlet-namephp/servlet-name servlet-classcom.evermind.server.http.CGIServlet/servlet-class init-param param-nameinterpreter/param-name param-valuephp/param-value /init-param /servlet servlet-mapping servlet-namephp/servlet-name url-pattern/*.php/url-pattern /servlet-mapping servlet-mapping servlet-namephp/servlet-name url-pattern/*.phtml/url-pattern /servlet-mapping etc... And it works great for me. Hope this helps. Good luck! Sean - Sean Leach Director of Technology | eBusiness Services NetLojix Communications, Inc. NASDAQ: NETX e - [EMAIL PROTECTED] v - 805.884.6375 f - 805.883.5627 w - www.netlojix.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Squires Sent: Tuesday, November 14, 2000 5:44 AM To: Orion-Interest Subject: PHP servlet problems Hi, I have a few php things I would like to run on my Orion server so I installed the php servlet: In global-web-application.xml changed: servlet-classcom.evermind.server.http.CGIServlet/s ervlet-class to servlet-classnet.php.servlet/servlet-class Put the phpsrvlt.jar into the jdk1.3/jre/lib/ext/ directory. Made sure that php runs on the command line. Restarted the Orion server (using admin.jar then rebooting the whole system just to make sure...) When I access the following page: html body ?php echo "Hello"; ? /body /html I receive the following page: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META http-equiv=Content-Type content="text/html; charset=windows-1252"/HEAD BODY/BODY/HTML I've tried a few other php pages that work and they deliver the same, but after 3 or 4 pages I am shown the following error: 500 Internal Server Error java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at java.lang.ClassLoader.loadClass(ClassLoader.java:290) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:290) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at com.evermind.server.http.HttpApplication.wo(JAX) at com.evermind.server.http.HttpApplication.v6(JAX) at com.evermind.server.http.HttpApplication.uh(JAX) at com.evermind.server.http.ed.sp(JAX) at com.evermind.server.http.ed.so(JAX) at com.evermind.util.f.run(JAX) I changed back to the CGIServlet but it came up with the same error, even after rebooting. If anyone has PHP running, could they point out what I have missed or done wrong? Thanks for your time, Tim. Tim Squires It's not what you know, it's who you tell.
RE: PHP servlet problems
I have it setup and running fine, I use: servlet servlet-namephp/servlet-name servlet-classcom.evermind.server.http.CGIServlet/servlet-class init-param param-nameinterpreter/param-name param-valuephp/param-value /init-param /servlet servlet-mapping servlet-namephp/servlet-name url-pattern/*.php/url-pattern /servlet-mapping servlet-mapping servlet-namephp/servlet-name url-pattern/*.phtml/url-pattern /servlet-mapping etc... And it works great for me. Hope this helps. Good luck! Sean - Sean Leach Director of Technology | eBusiness Services NetLojix Communications, Inc. NASDAQ: NETX e - [EMAIL PROTECTED] v - 805.884.6375 f - 805.883.5627 w - www.netlojix.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Squires Sent: Tuesday, November 14, 2000 5:44 AM To: Orion-Interest Subject: PHP servlet problems Hi, I have a few php things I would like to run on my Orion server so I installed the php servlet: In global-web-application.xml changed: servlet-classcom.evermind.server.http.CGIServlet/s ervlet-class to servlet-classnet.php.servlet/servlet-class Put the phpsrvlt.jar into the jdk1.3/jre/lib/ext/ directory. Made sure that php runs on the command line. Restarted the Orion server (using admin.jar then rebooting the whole system just to make sure...) When I access the following page: html body ?php echo "Hello"; ? /body /html I receive the following page: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META http-equiv=Content-Type content="text/html; charset=windows-1252"/HEAD BODY/BODY/HTML I've tried a few other php pages that work and they deliver the same, but after 3 or 4 pages I am shown the following error: 500 Internal Server Error java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at java.lang.ClassLoader.loadClass(ClassLoader.java:290) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:290) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at com.evermind.server.http.HttpApplication.wo(JAX) at com.evermind.server.http.HttpApplication.v6(JAX) at com.evermind.server.http.HttpApplication.uh(JAX) at com.evermind.server.http.ed.sp(JAX) at com.evermind.server.http.ed.so(JAX) at com.evermind.util.f.run(JAX) I changed back to the CGIServlet but it came up with the same error, even after rebooting. If anyone has PHP running, could they point out what I have missed or done wrong? Thanks for your time, Tim. Tim Squires It's not what you know, it's who you tell.