-
1. Re: jboss AS, jboss Web and php
peterj Dec 10, 2007 12:08 PM (in response to nitm)See the discussion at [url]http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121051[/ur]. Though some are the specific issues discussed are Linux-related, the general 'how to get php running in jbossas' portion applies to XP as well.
-
2. Re: jboss AS, jboss Web and php
nitm Dec 10, 2007 7:36 PM (in response to nitm)thanks for your reply.
i read the thread you pointed at, but i'm afraid that it's not what i'm looking for...
the main thing that i'm looking for is the JBoss Application Server and not the JBoss Web.
i only want the JBoss Web in order to use php (and url rewriting might be nice as well).
now, i'm still a bit confused about all of this, can i just add the JBoss Native to the JBoss AS? will that do the trick for me?
thanks, nitzan. -
3. Re: jboss AS, jboss Web and php
peterj Dec 11, 2007 11:08 AM (in response to nitm)That thread is about getting PHP to run on JBossAS. As indicated there, the steps are to install JBoss Native, and then install the PHP package from http://labs.jboss.com/jbossweb/downloads/php/. It worked for me.
-
4. Re: jboss AS, jboss Web and php
nitm Dec 18, 2007 7:44 PM (in response to nitm)hi,
i'm still having a problem with php in JBoss AS 4.2
i did try to follow everything that was said in the thread i was directed to, and other pages i could find but it does not help.
i get this exception:
The PHP Native library which allows executing PHP scripts was not found on the java.library.path
and the cause is:
java.lang.UnsatisfiedLinkError: Can't find SAPI class, no libphp5servlet in java.library.path
here's what i did so far (i hope i remember it all):
- installed JBoss AS 4.2.2
- added the JBoss Native 2.0.1 to the JBoss AS directory (bin\native)
- downloaded the php5servlet-windows-SP1-i586 file and moved the PHP folder to another location
- moved the php.ini to the windows directory
- edited the server\default\deploy\jboss-web.deployer/server.xml and server\default\deploy\jboss-web.deployer\conf/web.xml to work with the php servlet
- downloaded the jbossweb-extras.jar and placed it in all kind of places (server\default\deploy\jbossws.sar, JBOSS_HOME/lib, server\default\lib, JBOSS_HOME\bin\native)
no matter what i do i get this exception.. what i really dont understand is this so called "SAPI class".. i cant find any file called "libphp5servlet", i understand that the linux version of the php have a file called "libphp5servlet.so" but i dont have a windows equivalent.. so i guess that it's not a big suprise that it cant find it...
am i missing something?
thanks a lot, nitzan. -
5. Re: jboss AS, jboss Web and php
peterj Dec 19, 2007 2:55 PM (in response to nitm)The error message is written in Unixese. In Windows, the missing file is php5servlet.dll, and it should be in the bin/native directory. When you unpack the zip download http://labs.jboss.com/jbossweb/downloads/php/, copy the file from the PHP/bin directory to bin.native.
-
6. Re: jboss AS, jboss Web and php
nitm Dec 20, 2007 5:40 PM (in response to nitm)thanks a lot for your help peter.
i tried what you wrote but it doesnt help.
i still get the same error message even when php5servlet.dll is in bin\native.
any other ideas of what might the problem be?
thanks a lot!
nitzan. -
7. Re: jboss AS, jboss Web and php
peterj Dec 20, 2007 5:56 PM (in response to nitm)When the app server starts, it prints the value of JAVA_OPTS, and one of those options should be -Djava.library.path="...". Make sure that the bin/native directory, and the php directory (the one that has all of the php-related dlls) are in that list.
Another thing to try is open the php5servlet.dll with the depends utility (one of the XP support tools). This utility will chase down the dlls on which php5servlet depends to ensure that all of them are in the PATH (for me it says that dwmapi.dll is missing, but apparently it is not needed). -
8. Re: jboss AS, jboss Web and php
nitm Dec 23, 2007 3:52 PM (in response to nitm)peter,
i checked the JAVA_OPTS and the following directories:
- bin/native
- php/bin
- php/bin/ext
are included there
as for the "depends utility", i couldnt find a windows version of this so i downloaded "Dependency Walker" which does the same..
it says that my dwmapi.dll is missing as well but other than that it looks a ok.
what else can cause the problem?
thanks a lot for all your help, nitzan. -
9. Re: jboss AS, jboss Web and php
nitm Dec 23, 2007 4:04 PM (in response to nitm)oh, another question:
i used the service.bat that comes with the jboss-native to run the jboss AS as windows service.
this works great but only for local host.
i know that i should use the -b option when using run.bat (run -b 0.0.0.0) but i do i make it run as windows service like this?
thanks. -
10. Re: jboss AS, jboss Web and php
jaikiran Dec 25, 2007 2:49 AM (in response to nitm)"nitm" wrote:
oh, another question:
i used the service.bat that comes with the jboss-native to run the jboss AS as windows service.
this works great but only for local host.
i know that i should use the -b option when using run.bat (run -b 0.0.0.0) but i do i make it run as windows service like this?
thanks.
In the service.bat file edit the followingcall run.bat >run.log
tocall run.bat -b 0.0.0.0 >run.log
Restart your service after changing this file. -
11. Re: jboss AS, jboss Web and php
nitm Dec 25, 2007 5:20 AM (in response to nitm)ok, that did the trick.. now the server runs outside localhost as well..
thanks!
any ideas on the php problem? -
12. Re: jboss AS, jboss Web and php
peterj Dec 26, 2007 1:57 PM (in response to nitm)If the dependency walker did not notice any missing DLLs, then it should work. I have some other ideas, but my php-enabled setup is at work and I am at home, and I want to try them out first to see if they help (or even work) before suggesting them. So I will have to set up php at home. This will take a day or two.
But while I do that, a few more questions (my apologies if you already answered these and I missed them):
what version of the JDK are you using?
where did you install the jdk (what is JAVA_HOME set to)?
where did you install jbossas? (full path) -
13. Re: jboss AS, jboss Web and php
nitm Dec 27, 2007 6:15 PM (in response to nitm)peter, thanks a lot for all your help, i really appreciate it!
here's the info of the server:
jdk: there are two jdks on the computer: jdk1.5.0_14 and jdk1.6.0_03
the JAVA_HOME is set to: jdk1.5.0_14 (C:\Program Files\Java\jdk1.5.0_14)
jboss: i'm using jboss-4.2.2.GA and the JBOSS_HOME is set to: C:\Program Files\jboss\application-server\jboss-4.2.2.GA -
14. Re: jboss AS, jboss Web and php
peterj Dec 27, 2007 9:53 PM (in response to nitm)Take both the JDK and JBossAS out of Program Files. Paths with spaces in them tends to give some Java code fits. I have mine installed at c:\apps\jdk1.5.0_13 and c:\opt\jboss\jboss-4.2.2.GA. You do not have to re-install the JDK - simply move it to the new location and adjust JAVA_HOME accordingly.
Please verify that JBossAS is using the 1.5 JVM (and not 1.6); look for a message in the console log similar to the following:
16:56:39,265 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_12-b04,Sun Microsystems Inc.