Hi,

Can some experts out there please help me out on this error: 
java.lang.UnsatisfiedLinkError: C:\jboss-4.2.3.GA\bin\native\php5servlet.dll: 
This application has failed to start because the application configuration is 
incorrect. Reinstalling the application may fix this problem, no libphp5servlet 
in 
java.library.path(C:\jdk\jdk1.6.0_07\bin;C:\mysql5\bin;C:\jboss-4.2.3.GA\bin;C:\jboss-4.2.3.GA\bin\native;C:\php5\bin;C:\php5\ext;)

OS: Windows XP (not install any .NET framework)
ANT version: Ant 1.7.1
JDK version: jdk1.6.0 update 07
Database: mysql-5.0.67
Web server: jboss-4.2.3.GA (unpack jboss-portal-2.7.0.GA-bundled.zip)
Mysql connector/J: mysql-connector-java-5.1.6
PHP version: php-5.2.6-Win32
PHP servlet version: php5servlet-windows-i586-SP1
JBoss native: jboss-native-2.0.6-windows-x86-ssl

ANT_HOME=C:\ant-1.7.1
JAVA_HOME=C:\jdk\jdk1.6.0_07
JBOSS_HOME=C:\jboss-4.2.3.GA
CLASSPATH=.;C:\jdk\jdk1.6.0_07\lib\tools.jar;C:\jboss-4.2.3.GA\bin\run.jar;C:\jboss-4.2.3.GA\server\default\lib\mysql-connector-java-5.1.6-bin.jar;
PATH=C:\ant-1.7.1\bin;C:\jdk\jdk1.6.0_07\bin;C:\mysql5\bin;C:\jboss-4.2.3.GA\bin;C:\jboss-4.2.3.GA\bin\native;C:\php5;C:\php5\ext;

Steps
1. Unpack apache-ant-1.7.1-bin.zip to c:\ant-1.7.1
2. Install jdk-6u7-windows-ia64.exe at c:\jdk\jdk1.6.0_07
3. Install mysql-5.0.67-win32.zip at c:\mysql5
4. Unpack jboss-portal-2.7.0.GA-bundled.zip to c:\jboss-4.2.3.GA
5. Edit c:\jboss-4.2.3.GA\bin\run.bat, set -Xms1024m -Xmx1024m 
-XX:PermSize=512m -XX:MaxPermSize=512m
6. Unpack mysql-connector-java-5.1.6.zip, copy 
mysql-connector-java-5.1.6-bin.jar to c:\jboss-4.2.3.GA\server\default\lib\
7. Configure c:\jboss-4.2.3.GA for mysql datasource
8. Unpack php-5.2.6-Win32.zip to c:\php5
9. Unpack php5servlet-windows-i586-SP1.zip to c:\php5servlet
10. Copy missing .dll files from c:\php5servlet\bin\ext to c:\php5\ext
11. Copy missing .dll files from c:\php5servlet\bin to c:\php5
12. Copy php5servlet.dll downloaded at 
http://members.cox.net/ocjohnsons/php5servlet.zip to c:\php5
13. Copy c:\php5\php.ini-recommended to c:\windows
14. Edit c:\windows\php.ini, change extension_dir="c:/php5/ext"
15. Add  to 
c:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\server.xml
16. Add to 
c:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\conf\web.xml as 
below:
        
                <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>

        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>index.php</welcome-file>
        </welcome-file-list>

17. Download jboss-native-2.0.6-windows-x86-ssl.zip at 
http://www.jboss.org/jbossweb/downloads/jboss-native/?action=a&windowstate=maximized
18. Unpack jboss-native-2.0.6-windows-x86-ssl.zip to 
c:\jboss-native-2.0.6-windows-x86-ssl
19. Copy *.dll from jboss-native unpack folder to c:\jboss-4.2.3.GA\bin\native
20. Copy php5servlet.dll downloaded at 
http://members.cox.net/ocjohnsons/php5servlet.zip to 
c:\jboss-4.2.3.GA\bin\native
21. Append to c:\jboss-4.2.3.GA\bin\run.conf as below:
        LD_LIBRARY_PATH=c:/jboss-4.2.3.GA/bin/native
        export LD_LIBRARY_PATH
22. Create mysql db=testdb, create table=users, create column=user_id, 
first_name, last_name
23. Create index.php at 
c:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\ROOT.war\index.php 
as below:
   <?php
        $username = "root";
        $password = "mysqlpassword";
        $hostname = "localhost";        
        $dbh = mysql_connect($hostname, $username, $password)
        or die("Unable to connect to MySQL");
        print "Connected to MySQL";
        $selected = mysql_select_db("testdb",$dbh) or die("Could not select 
testdb");
        if (mysql_query("insert into users 
values('1','fname_user1','lname_user1')")) {
            print "successfully inserted record";
        }
        else {
           print "Failed to insert record";
        }
        mysql_close($dbh);
   ?>

24. Create index.php at 
c:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\ROOT.war\fetch.jsp 
as below:
   <%@ page import="java.sql.*" %>
   <%
     String connectionURL = "jdbc:mysql://localhost/testdb";
     Connection connection = null;
     Statement statement = null;
     ResultSet rs = null;
   %>
   
     
       <%
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         connection = DriverManager.getConnection(connectionURL, "root", 
"mysqlpassword");
         statement = connection.createStatement();
         rs = statement.executeQuery("SELECT * FROM users");
         while (rs.next()) {
            out.println(rs.getString("first_name"));
         }
         rs.close();
      %>
    
  

25. At command prompt, type 'cd c:\jboss-4.2.3.GA\bin'
26. Then, run.bat -c default -b 0.0.0.0
27. Browse to http://localhost:8080/index.php prompt error as below:
        java.lang.UnsatisfiedLinkError: 
C:\jboss-4.2.3.GA\bin\native\php5servlet.dll: This application has failed to 
start because the application configuration is incorrect. Reinstalling the 
application may fix this problem, no libphp5servlet in 
java.library.path(C:\jdk\jdk1.6.0_07\bin;C:\mysql5\bin;C:\jboss-4.2.3.GA\bin;C:\jboss-4.2.3.GA\bin\native;C:\php5\bin;C:\php5\ext;)
28. Browse to http://localhost:8080/fetch.jsp show 'fname_user1' on screen.

Can some expert out there help me out to compile a php5servlet.dll which is 
compatible with above scenario:

I am sure others out there also having the same problems. Would appreciate if 
some experts out there can help me out on this for few days.

Thanks a lot,
Eunice

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189025
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to