Yes, it does, but not out-of-the-box. See http://www.jboss.org/jbossweb/modules/php/index.html.
Basically, you need to more things:
1) JBoss Native - download and install the one specific to your operating system
2) The PHP module - download and configure as indicated in the above link.
3) You must package your PHP app within a WAR file. The PHP module download comes with a demo PHP WAR file, use that as a template.
I followed the steps given in the below link
I was able to run php script with Jbossweb server.
I wanted to know how I can run php script using Jboss application server.
I am very naive to Jboss. Could you please give me the steps to be followed to run PHP script on JBoss ?
I have downloaded the Jboss Native. I dont know how to install it!.
After Extracting the Jboss Native, I get two folders.
I also tried to follow the steps in the link http://www.jboss.org/jbossweb/modules/php/index.html .
to configure PHP module.
But There is no Jbossweb.sar in the deploy folder. How should i install PHP module on jboss application server?
Thanks in advance
To install JBoss Native, copy the contents of the bin directory to the jboss_home/bin directory.
For JBossAS 4.2.2, the jboss-web.sar has been replaced by jboss-web.deployer.
Hi Peter ,
Thanks for the reply.
I am explaining the steps that I tried, to make PHP script 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 server\default\deploy\jboss-web.deployer/server.xml
(Added the following lines in the server.xml)
8. Edited the server\default\deploy\jboss-web.deployer\conf/web.xml to work with the php servlet .
(Added the following lines in web.xml)
10. Added one line in the <welcome-file-list> element:<welcome-file-list>
11. I have set the environment variables:
JAVA_HOME=<PATH TO YOUR JDK INSTALLATION>
And .\server\default\deploy\jboss-web.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
I am getting the following error:
java.lang.UnsatisfiedLinkError: Can't find SAPI class, no libphp5servlet in java.library.path
I have installed Java Native. I have downloaded java Native â€œjboss-native-2.0.4-windows-x86-sslâ€�.(is that the correct native ??)I copied the contents of folder â€œbinâ€� to Jboss_home/bin.
Could you please guide me in running php script on Jboss Application Server?
Where is libphp5servlet? I dint find any libphp5servlet in PHP module or Java Native.
Thanks in advance.
for the step number 7 :
The line added for server.xml is
I forgot to add that line in the above post. :)
Use the Code button when posting XML text - select the text and click Code. It will place [code ] ... [ /code ] brackets around the text.
The error message "Can't find SAPI class, no libphp5servlet in java.library.path" is using the Linux name of the file. On Windows the name is php5servlet.dll and you can find it in the PHP download at PHP/bin. You should copy that file to jboss_home/bin/native. And make sure that c:/php/bin is in your PATH.
By refering to the above thread, I was able to run php script on Jbossas.
I just copied the php5servlet.dll into the bin folder of Jboss AS. & now it is working. There is some problem with the package names.
The JBoss people have to update the php5servlet.dll for Windows in the PHP module.
Thanks a lot peter
I am trying to run PHP on JBoss As 7.1.
I tried following the steps mentioned above however am stuck at the AS configurations as in 7.1 we do not have jboss-web.deployer.
Can someone please help me to configure PHP for JBoss AS 7.1?
I suspect that the php5servlet.dll mechanism will not work in 7.x (but it might, I haven't tried it). I would instead try Quercus. See if this page, or the pages linked to, helps:
After going through this thread (and a few others) as suggested by you I succesfully deployed quercus-4.0.25.war (by unzipping it) on my JBoss AS7 running on Windows 7.
I am able to hit the php pages when I paste them in "\jboss-as-7.1.1.Final\standalone\deployments\quercus.war".
Further my target is to deploy OWA (Open Web Analytics) which is built using PHP on the same server as my web application is running on, which happens to be JBoss AS7.
The problem what I am facing is when I try to install OWA it generates a config file (inside quercus.war) with the values I have entered in the installation form.Now in the second step OWA tries to read these values but all it reads is blank (empty) values.
After comparing this newly generated config file with the same config file generated over wamp server (during installation of OWA over wamp) what I found is that there is difference in the struture of both the generated files. The one generated thru JBoss over Quercus didn't have any new line. All config file entry was in a single line whereas the config file generated over wamp had multiple new lines.
When I replace the config file generated using Quercus over JBoss with the config file generated on wamp, it works fine.
As per my understanding what I am interpreting is that due to some encoding difference this is happening.
Is there a difference between the encoding which quercus renders with the one PHP module runs on?