3 Replies Latest reply on Feb 27, 2007 1:49 PM by jfclere

    PHP with Linux x86_64

    moltke

      I have succesfully installed PHP on JBossWeb 1.0.1 on my 32-bit Linux (Kubuntu 6.10). Then I have done the same on my 64-bit OpenSUSE 10.2 (of course with 64-bit version of JBossWeb and native modules). Now when I start JBossWeb I receive the following strange error:

      7:37:31,737 ERROR [[/]] StandardWrapper.Throwable
      java.lang.UnsatisfiedLinkError: /opt/jbossweb/bin/native/libphp5servlet.so: Can't load AMD 64-bit .so on a AMD 64-bit platform, no libphp5servlet in java.library.path(/opt/jbossweb/bin/native)
      at org.apache.catalina.servlets.php.Library.(Library.java:64)
      at org.apache.catalina.servlets.php.Library.initialize(Library.java:103)
      at org.apache.catalina.servlets.php.Handler.init(Handler.java:104)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3885)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4154)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      ...

      Any ideas what's going on?

        • 1. Re: PHP with Linux x86_64
          jfclere

          See http://labs.jboss.com/file-access/default/members/jbossweb/freezone/modules/php/index.html

          You probably miss the libphp5.so or/and libphp5servlet.so in $JBOSS_HOME/bin/native

          • 2. Re: PHP with Linux x86_64
            moltke

            I've solved the problem. I've compiled PHP and the servlet using buildphp.sh and now it works fine. However, this took me the all day because of not knowing in advance the tools, libraries and devel packages the script uses. There were also some bugs in the script. I'm not sure I've remembered them all:

            1. Bad urls to sources to download, but this was easy to find out
            2. I've needed to compile JPEG library manually because of some error (I think it was because of using ./libtool instead of libtool) and of course to correct the script
            3. I've needed to enable MySQL module, although I didn't want it
            4. MySQL compile parameters are missing --enable-thread-safe-client

            Maybe it is a good idea to support more source distribution than binaries. Now I think there should be also some easy way to compile just libphp5.so and libphp5servlet.so. Many Linux distros have PHP and modules available as packages, which also are easy to update.

            • 3. Re: PHP with Linux x86_64
              jfclere

              1 - The URL's are in the start of buildphp.sh to make changes easy.
              2 - I have fixed something related to this one.

              3 - I will test this one.

              4 - I have fixed it thanks.

              I will prepare a wiki how to build the php package but may be FastCGI is what you are looking for.