I'm trying to get PHP running as a servlet under JRun 3.0sp2a (devel.
edition), and I'm hoping someone can help me or offer some advice.
I have set up JRun and run the demo servlets, so that part checks out.
I created a new app in the JMC and set up some servlet defs and
mappings, based on a reading of the web.xml file that was included with
PHP.  In my php.ini file, I have the following stuff:

[java]
java.library.path=/usr/local/lib/php/extensions/no-debug-zts-20001214:/usr/java/lib:/usr/local/java/lib

java.home=/usr/java
java.class.path=/usr/local/jsdk:/usr/local/jsdk/lib/jsdk.jar:/home/bob/bin/pj/pj.jar:

/usr/local/java/lib:/usr/local/java/lib/phpsrvlt.jar:/usr/local/java/lib/php_java.jar

extension_dir=/usr/local/lib/php/extensions/no-debug-zts-20001214
extension=libphp_java.so
java.library=/usr/java/jre/lib/sparc/libjava.so

I'm still green with Java, so some / all of these paths may be way off.
I tried to correct the error shown below by adding the really long
extensions directory to the path (that is where I found
libphp_java.so).  Anyway, I create a simple php script that just calls
phpinfo() and stick it in the right spot, then try to call it via JRun's
web server.  I get this the first time I try it:

500 Internal Server Error

/php/phpinfo.php:

javax.servlet.ServletException: no php_java in java.library.path
java.lang.UnsatisfiedLinkError: no php_java in java.library.path
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.(Compiled Code)
        at java.lang.Error.(Error.java:50)
        at java.lang.LinkageError.(LinkageError.java:43)
        at java.lang.UnsatisfiedLinkError.(UnsatisfiedLinkError.java:42)

        at java.lang.ClassLoader.loadLibrary(Compiled Code)
        at java.lang.Runtime.loadLibrary0(Runtime.java:471)
        at java.lang.System.loadLibrary(System.java:745)
        at net.php.reflect.loadLibrary(reflect.java:34)
        at
        at net.php.servlet.init(Compiled Code)
        at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(Compiled
Code)
        at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(JRunServletLoader.java:190)

        at
allaire.jrun.servlet.JRunServletLoader.loadServlet(JRunServletLoader.java:177)

        at
allaire.jrun.servlet.JRunSE.getServletReference(JRunSE.java:1267)
        at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)

        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)

        at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
        at allaire.jrun.ThreadPool.run(Compiled Code)
        at allaire.jrun.WorkerThread.run(Compiled Code)

But wait, there's more!  The second attempt displays this error:

500 Internal Server Error

/php/phpinfo.php:

javax.servlet.ServletException: send
java.lang.UnsatisfiedLinkError: send
        at net.php.servlet.service(servlet.java:162)
        at net.php.servlet.service(servlet.java:180)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)

        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)

        at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
        at allaire.jrun.ThreadPool.run(Compiled Code)
        at allaire.jrun.WorkerThread.run(Compiled Code)

Has anyone else successfully set this up to run under JRun?  I'm new to
Java (but old to PHP), so I imagine that it is mainly a config file
problem.  If anyone else has examples of working paths, etc., I would
greatly appreciate hearing about it.

--
Jim Kane
Director of Development, Information Network of Arkansas
http://www.accessarkansas.org/ -- the official Arkansas Homepage




-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to