[jboss-user] [Beginners Corner] - Re: Does Jboss support PHP?

vikramap do-not-reply at jboss.com
Wed Jun 18 01:22:11 EDT 2008


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)

    <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 .\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

please note:
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.
vikram


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158883#4158883

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158883




More information about the jboss-user mailing list