I have been trying to use PHP on Tomcat (don't ask why, I just have to), and have been following the Configure PHP with Tomcat and several tutorials given for PHP with PECL & Tomcat.
I've done most of the things required by the tutorials, like setting all the environment variables that are required, but I still run into errors such as the one shown below, on startup:
javax.servlet.ServletException: Servlet.init() for servlet php threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
root cause
java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\php5servlet.dll: The specified procedure could not be found
java.lang.ClassLoader$NativeLibrary.load(Native Method)
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
java.lang.Runtime.loadLibrary0(Runtime.java:823)
java.lang.System.loadLibrary(System.java:1028)
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.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
Also, whenever I refresh a page. It gives this exception :
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.UnsatisfiedLinkError:
net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V
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:717)
I have been trying to solve this, unsuccessfully, since yesterday. Can anyone tell me what am I doing wrong here? Or what the solution might be? Thanks.