3 Replies Latest reply on Apr 13, 2015 2:07 AM by baseaditi

    jboss5.0.1Ga with php

      steps for making php run on jboss application server on WINDOWS XP Operating System.

      1. Download & Extract Jboss Application server on to a local drive(say C:\ drive ).

      2. Download & Extract php5servlet-windows-i586-SP1.zip(the PHP module) to C: drive.

      3. Created a folder “php5” under C:

      4. copied c:\php5servlet-windows-i586-SP1\PHP\* to c:\php5.

      (now “php5” folder has a “bin” folder inside it).

      5. Made a copy of the C:\php5\bin\php.ini-recommended to %WINDIR%\php.ini. (%WINDIR% is nothing but C:\WINDOWS)

      6. Opened %WINDIR%\php.ini and changed extension_dir value to c:/php5/bin/ext/.

      7. Edited the jboss-5.0.1.GA\server\default\deploy\jbossweb.sar\server.xml

      (Added the following lines in the server.xml)

      <Listener className="org.jboss.web.php.LifecycleListener"/>

      8. Edited the jboss-5.0.1.GA\server\default\deployers\jbossweb.deployer\web.xml to work with the php servlet .

      (Added the following lines in web.xml)

      <servlet-name>php</servlet-name>

      <servlet-class>org.jboss.web.php.Handler</servlet-class>

      <init-param>

      <param-name>debug</param-name>

      <param-value>0</param-value>

      </init-param>

      <load-on-startup>6</load-on-startup>

       

      <servlet-name>phps</servlet-name>

      <servlet-class>org.jboss.web.php.Highlight</servlet-class>

      <servlet-mapping>

      <servlet-name>php</servlet-name>

      <url-pattern>*.php</url-pattern>

      </servlet-mapping>

      <servlet-mapping>

      <servlet-name>phps</servlet-name>

      <url-pattern>*.phps</url-pattern>

      </servlet-mapping>

      10. Added one line in the <welcome-file-list> element:<welcome-file-list>

      <welcome-file>index.html</welcome-file>

      <welcome-file>index.htm</welcome-file>

      <welcome-file>index.php</welcome-file>

      <welcome-file>index.jsp</welcome-file>

      </welcome-file-list>

      11. I have set the environment variables:

      JAVA_HOME=<PATH TO YOUR JDK INSTALLATION>

      PHP_HOME=c:\php5 PATH=%PATH%;%JAVA_HOME%\bin;%PHP_HOME%\bin;%PHP_HOME%\bin\ext;

      And jboss-5.0.1.GA\server\default\deployers\jbossweb.deployer, has jbossweb-extras.jar

      12. I have created a simple php script <?php phpinfo(); ?> in index.php file and have copied it under .\server\default\deploy\ROOT.war

       

      13 The most important thing is that when we download php5servlet-windows-i586-SP1 it contains the phpservlet.dll in php/bin for working with catalina.apache

      when we edit/add lines for jboss such as org.jboss.web.php we need to change the phpservlet.dll

      i download the corrected phpservlet.dll for jboss..simply download it and put it into php5servlet-windows-SP1-i586\PHP\bin

      file is attach with it

       

      i hope this will solve the sapiclass problem

        • 1. Re: jboss5.0.1Ga with php
          gopalsamy.p

          Thank you Very much!

          I using Windows Xp, I followed your instructions but not get positive result. Then I downloaded  jbossweb-extras.jar and extract it into "C:\jboss-6.0.0.Final\lib" Then stop and start jboss I got it.

          • 2. Re: jboss5.0.1Ga with php
            gopalsamy.p

            Then one thing we can modify our php configuration using "C:\Windows\php.ini" configuration file. I attached jbossweb-extras.jar.

            • 3. Re: jboss5.0.1Ga with php
              baseaditi

              I did all above stuff but getting error like

               

              java.lang.UnsatisfiedLinkError: C:\Windows\System32\php5servlet.dll: Can't find dependent libraries, no libphp5servlet in java.library.path(C:\jboss-5.0.1.GA\bin\nati

              ve;C:\ProgramData\Oracle\Java\javapath;C:\csvn\bin\;C:\csvn\Python25\;C:\Windows\System32;C:\Program Files\Java\jdk1.6.0_45\bin;C:\jboss-5.0.1.GA\bin)

               

              Please help me