java - Configuring PHP on Tomcat gives exception: UnsatisfiedLinkError -


i have been trying use php on tomcat (don't ask why, have to), , have been following configure php tomcat , several tutorials given php pecl & tomcat.

i've done of things required tutorials, setting environment variables required, still run errors such 1 shown below, on startup:

javax.servlet.servletexception: servlet.init() 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: specified procedure not 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 refresh page. gives exception :

javax.servlet.servletexception: servlet execution threw 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 solve this, unsuccessfully, since yesterday. can tell me doing wrong here? or solution might be? thanks.

what version of php using?

not versions of php supports php5servlet. php5servlet.dll library needs function or method contained in library php5ts.dll, library php5ts.dll changes according version of php (adding new or substracting old methods), reason when php5servlet.dll calls method, maybe can't found it.

you need 1 version of php (maybe older using) according pecl library using.

the last tested version of php me http://windows.php.net/downloads/releases/archives/php-5.2.16-win32-vc6-x86.zip

i not know still why php 5.3.0 or newer vc6 not functional.

the last version of pecl required library (php5servlet.dll, php_java.dll, php_java.jar , phpsrvlt.jar) http://museum.php.net/php5/pecl-5.2.5-win32.zip

the tomcat used testing http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.27-windows-x86.zip

if want work .php files...

now (this below part not reason error, not fix it.), can work putting .php files directly in

tomcatdir\webapps\root\ 

putting generated .jar file php5srvlt.jar inside of \lib changing web.xml file like:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="http://java.sun.com/xml/ns/javaee                       http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"   version="3.0"   metadata-complete="true">   <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> </web-app> 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -