-
1. Re: Load Balance + Cluster + JBoss-5.1.0.GA + PHP5 + Win2K3
peterj Jun 4, 2010 5:45 PM (in response to hectorgonzalez)>>I have the following ERROR:
ERROR [[/jbossws]] StandardWrapper.Throwable java.lang.UnsatisfiedLinkError:
no php5servlet in java.library.path,
no libphp5servlet in java.library.pathThe problem is that the java.library.path is not set correctly. It needs to include not only the php5servlet.dll file, but also all DLLs in which it depends. If you have followed these threads:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146675#4146675
http://community.jboss.org/thread/80067?tstart=0
http://community.jboss.org/message/426266#426266
and are still having a problem, then try using the Dependency Walker (http://www.dependencywalker.com/) app to verify the required DLLs, and try using the Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) to watch what DLLs the JVM is loading.
Personally, I no longer use php5servlet, instead I use Quercus (http://quercus.caucho.com/)
-
2. Re: Load Balance + Cluster + JBoss-5.1.0.GA + PHP5 + Win2K3
hectorgonzalez Jun 7, 2010 11:24 AM (in response to peterj)Peter,
Many thanks for your reply.
I installed Ms. Framework 3.5 SP1 and downloaded Dependency Walker. No problems with dll.
I test it and the console came up with no errors.
I launched index.php with phpinfo(), but I cannot see MySQL information, therefore, when I launch testdb.php.....
I get in the JBoss SA console:
PHP Fatal error: Call to undefined function mysql_connect() in C:\jboss-5.1.0.G
A\server\all\deploy\ejemplo.war\testdb.php on line 5testdb.php
<?php
$username = "root";
$password = "manager";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL";
$selected = mysql_select_db("test",$dbh) or die("Could not select first_test");
if (mysql_query("insert into people values('1','Indranil','Burger')")) {
print "successfully inserted record";
}
else {
print "Failed to insert record";
}
mysql_close($dbh);
?>Peter,
I will download and install Quercus. I will post you my results later.
Gracias, again
-
3. Re: Load Balance + Cluster + JBoss-5.1.0.GA + PHP5 + Win2K3
peterj Jun 7, 2010 2:18 PM (in response to hectorgonzalez)I suspect that the mysql.so module is in the wrong location. If I recall correctly, the ph5servlet comes with its own version of PHP and thus its own versions on the various modules, and it does not come with all of the modules (which means it would be very hard to supply the mysql module). I recall there was a way to redirect php5servlet to use an installed PHP instead of its built-in one, but I also recall that I never had luck getting that to work.
Now I have to state that I did the work with php5servlet over 2 years ago so my recollections might not be that accurate. My qork with Quercus has been very recent though, I think you will probably be happy with it.
-
4. Re: Load Balance + Cluster + JBoss-5.1.0.GA + PHP5 + Win2K3
hectorgonzalez Jun 7, 2010 6:31 PM (in response to peterj)Peter,
I changed on my C:\jboss-5.1.0.GA\server\all\deploy\jbossweb.sar\server.xml the folllowing:
Find <Listener className="org.jboss.web.php.LifecycleListener"/> and comment this out.
I commented every php serverlet reference and changed into C:\jboss-5.1.0.GA\server\all\deploy\jbossweb.sar\server.xml
It is working, what I found is that the phpinfo(); it is pretty different in quercus then PHP itselft.
I am able to insert and select several record.
I also found that quercus can run under WebLogic, sound interestee to talk.
Thanks againg, Peter
Bye