-
1. Re: Run PHP on JBOSS4.0.2 Application Server
peterj Jun 5, 2009 11:56 AM (in response to ravindrashinde11) -
2. Re: Run PHP on JBOSS4.0.2 Application Server
ravindrashinde11 Jun 8, 2009 1:32 AM (in response to ravindrashinde11)Hi Peter,
thanks for reply
Which PHP module and native I should use for JBOSS4.0.2 AS on windows? I am getting error as “java.lang.UnsatisfiedLinkError: no php5servlet in java.library.path�.
I followed below steps:
1) Download and unzip JBoss Appplication server 4.0.2 at location D:\iWatch\jboss-4.0.2
2) Download and unzip the PHP module from http://labs.jboss.com/portal/jbossweb/downloads . Call this directory as D:\iWatch\php5servlet-windows-SP1-i586\PHP
3) Download and install JBoss Native jboss-native-2.0.0-windows-amd64 from: http://www.jboss.org/jbossweb/downloads/jboss-native/?action=a&windowstate=maximized
4) Copy JBoss Native into JBossHome directory, confirm whether you have D:\iWatch\jboss-4.0.2/bin/native directory.
5) Make sure you do not have a stray php.ini file lying around.
6) Set the php5servlet\bin & php5servlet\bin\ext in PATH variable.
7) Download php5servlet.dll from
http://members.cox.net/ocjohnsons/php5servlet.zip
Replace it with php5servlet\bin
8) Copy php5servlet\webapps\php-examples.war into JBOSS_HOME\server\default\deploy.
9) added a Listener to the server.xml in server\default\deploy\jboss-web.deployer
10) JBOSS_HOME/server/default/deploy/jbossweb.sar/conf/web.xml
Edit this as
<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>
11) Download jbossweb-extras.jar for php http://anonsvn.jboss.org/repos/jbossreflex/trunk/php/jbossweb-extras.jar
Copy to JBOSS_HOME\server\default\lib
11. Start the server and access http://localhost:8080/php-examples/index.php -
3. Re: Run PHP on JBOSS4.0.2 Application Server
peterj Jun 8, 2009 12:58 PM (in response to ravindrashinde11)I do not think I have ever tried the PHP servlet on 4.0.2. With the 4.2.x version, the run.bat file looks for the existence of a bin/native directory, and if it finds it, adds it to the java.library.path. The phpservlet.dll that the exception text said was missing is placed into the bin/native directory. My recommendation is to download 4.2.3 and compare its run.bat to the one in 4.0.2 and make the appropriate changes concerning the bin/native directory. Another possibility is to add the bin/native directory to the PATH.
I noticed you downloaded the amd64 variant of Native. Are you running with a 64-bit JVM? If so, you will have a problem because the php5servlet.dll is compiled as 32-bit and thus will not load. You will either have to install and use a 32-bit JVM, or grab the php5servlet source and build it for 64-bit. -
4. Re: Run PHP on JBOSS4.0.2 Application Server
ravindrashinde11 Jun 12, 2009 10:03 AM (in response to ravindrashinde11)Hi Peter.
I done a setup for JBOSS4.2.2 .While running Dependency walker some dlls were missing I added them. But still in Dependency walker log window error is Error: "The Side-by-Side configuration information for "d:\iwatch\php5servlet-windows-sp1-i586\php\bin\PHP5SERVLET.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001)."
I followed below steps. Is anything missing.
Steps for PHP integration with JBOSS
1) Downloaded and unzip JBoss Appplication server 4.2.2 at location D:\iWatch\jboss-4.2.2
2) Download and unzip the PHP module from http://labs.jboss.com/portal/jbossweb/downloads . Call this directory as D:\iWatch\php5servlet-windows-SP1-i586\PHP
3) Downloaded and installed JBoss Native jboss-native-2.0.1-windows-i686-ssl: http://www.jboss.org/jbossweb/downloads/jboss-native/?action=a&windowstate=maximized
4) Copy JBoss Native into JBossHome directory, confirm whether you have D:\iWatch\jboss-4.2.2.GA\bin\native directory.
5) Make sure you do not have a stray php.ini file lying around.
6) moved the php.ini to the windows directory
7) Set the php5servlet\bin & php5servlet\bin\ext in PATH variable.
8) Download php5servlet.dll from
http://members.cox.net/ocjohnsons/php5servlet.zip
Replace it with php5servlet\bin
8) Copy php5servlet\webapps\php-examples.war into JBOSS_HOME\server\default\deploy.
9) added a Listener to the server.xml in server\default\deploy\jboss-web.deployer
10) JBOSS_HOME/server/default/deploy/jbossweb.sar/conf/web.xml
Edit this as
<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>
11) Download jbossweb-extras.jar for php http://anonsvn.jboss.org/repos/jbossreflex/trunk/php/jbossweb-extras.jar
Copy to JBOSS_HOME\server\default\lib
11. Environment variables setup done. -
6. Re: Run PHP on JBOSS4.0.2 Application Server
satya.godavarti Apr 16, 2012 6:13 PM (in response to peterj)Hello
I am trying to run PHP module in JBOSS 4.2.3 Appliocation Server (AIX Operating System). I am getting java.lang.UnsatisfiedLinkError: php5servlet (A file or directory in the path name does not exist.), libphp5servlet (Not found in java.library.path). If anyone is successful in deploying PHP in JBOSS, please help me.
Thanks for the help
-
7. Re: Run PHP on JBOSS4.0.2 Application Server
peterj Apr 16, 2012 6:44 PM (in response to satya.godavarti)Did you look at all of the links I posted earlier? The answer is in there...