Hi, We have a doc at http://wiki.apache.org/jakarta-tomcat/UsingPhp.
Don't use JDK 1.4.0-rc, that's a fairly terrible version. Try JDK 1.4.2 instead. Set the java.library.path system property that way you would other Tomcat properties: in bin/catalina.bat for command-line usage or via the Tomcat service configurator if you're running it as a Windows service. This property is a path string that should include your PHP DLL. Yoav Shapira http://www.yoavshapira.com >-----Original Message----- >From: Matt Anderson [mailto:[EMAIL PROTECTED] >Sent: Monday, November 29, 2004 2:05 AM >To: Tomcat Users List >Subject: PHP to run under Tomcat > >Hi All, > >I was wondering if any of you could help me with some Tomcat >administration. >I am trying to configure Tomcat (and according to the specs on apache.org >it >can be done) to use PHP and I don't want to have Apache handling PHP and >Tomcat handling JSP I would like the Tomcat to handle both. I have done the >following > >I installed PHP4 >I set the environment variable PHP_HOME to c:\php as this was where I >installed it >I moved phpsrvlt.jar from c:\php\sapi\ to the common\lib directory >I added in the following lines in web.xml > ><servlet> > <servlet-name>php</servlet-name> > <servlet-class>net.php.servlet</servlet-class> ></servlet> > ><servlet> > <servlet-name>php-formatter</servlet-name> > <servlet-class>net.php.formatter</servlet-class> ></servlet> > ><servlet-mapping> > <servlet-name>php</servlet-name> > <url-pattern>*.php</url-pattern> ></servlet-mapping> > ><servlet-mapping> > <servlet-name>php-formatter</servlet-name> > <url-pattern>*.phps</url-pattern> ></servlet-mapping> > >I renamed the php.ini-dist to php.ini in c:\php >I then modified the following lines >extension_dir = .\ -> extension_dir = "C:\php\extensions" >;extension=php_java.dll -> extension=php_java.dll > >[Java] >java.class.path = C:\php\extensions\php_java.jar >java.home = C:\j2sdk1.4.0-rc\ >java.library = C:\j2sdk1.4.0-rc\jre\bin\client\jvm.dll >java.library.path = .\ > >Now my I am using >Windows 2000 Server for the OS >Jakarta Tomcat 5.0.27 >php-4.3.9-Win32 > > >The error message I seem to get is >java.lang.UnsatisfiedLinkError: no php5servlet in java.library.path > java.lang.ClassLoader.loadLibrary(ClassLoader.java:1410) > java.lang.Runtime.loadLibrary0(Runtime.java:772) > java.lang.System.loadLibrary(System.java:832) > net.php.reflect.loadLibrary(reflect.java:34) > net.php.reflect.<clinit>(reflect.java:29) > net.php.servlet.init(servlet.java:157) > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:11 >7 >) > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16 >0) > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java >:793) > >org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Conn >e >ction(Http11Protocol.java:702) > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java >:571) > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja >v >a:644) > >and if I hit refresh on the same page I get the following different error >java.lang.UnsatisfiedLinkError: send > net.php.servlet.send(Native Method) > net.php.servlet.service(servlet.java:190) > net.php.servlet.service(servlet.java:214) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > >Why I get two different errors is beyond me. I have done ALOT of research >into finding the solution to this and I find there are many people who have >come across the same problem but noone has a solution. Has anyone managed >to >get PHP to work under Jakarta Tomcat and can anyone see what I am doing >wrong? Thank you all so much for your time and I thank you in advance. > >Kindest Regards, >Matt Anderson > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]