From: <php...@li...> - 2007-03-21 12:48:54
|
I've sent this message before but it was a little off-topic in a thread tha= t I should have assumed closed when you help me to make my script work. I'm sending my questions again, not to be persistent, but to be a little more organized. Two questions came up: 1) When I run the install.sh script it overwrites my php.ini with the PHP/Java Bridge configuration. It does not bother me right now because I'm not using any special configuration, but when I go on production I will need my php.ini file. The problem is that if I append the lines of the php.ini file that the install.sh created to my original php.ini, the extension just doesn't load. Is there any consideration that I should take into account before merging both ini files? 2) In a previous email, Jost told me that PHP/Java Bridge does not care about CLASSPATH variable, and here comes my problem. I have to implement an API which uses some XML files for its configuration. The xml is loaded using th= e getSystemResource method of the ClassLoader, which looks for a certain file on the classpath as I understand. So, how should I indicate where those files are using PHP/Java Bridge? Right now I just added the path to the conf/ folder to the CLASSPATH and everything worked. Thanks Andr=E9s Gattinoni |
From: <php...@li...> - 2007-03-21 16:24:14
|
Hi, [please excuse the delay] > When I run the install.sh script it overwrites my > php.ini with the PHP/Java Bridge configuration. It doesn't do this if you php installation supports an /etc/php.d/ directory. Please see the php --configure help for details (php's configure, not the bridge configure script). > install.sh created to my original php.ini, the > extension just doesn't load. The only thing the extension need is a extension=java.so entry. > In a previous email, Jost told me that PHP/Java > Bridge does not care about > CLASSPATH variable, Some older JDK may still read the CLASSPATH environment variable. But since Apache discards all environment variables and executes in a clean environment you cannot pass it to the VM (if you want to run the VM as a sub-component of Apache). > getSystemResource method of the ClassLoader It should find the resources in the standard Java repository, which is /usr/share/java/ext or /usr/java/packages/lib/ext. > So, how should I indicate where those Just modify the standard location using the -Djava.ext.dirs=... option. If you want to pass this option from Apache, use a wrapper script, please see our FAQ for details. BTW: Isn't that backwards? If you want to load resources from a user dir, why don't you simply use getResource() instead of getSystemResource()? Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2007-03-21 18:46:24
|
On 3/21/07, php...@li... < php...@li...> wrote: > > Hi, > > [please excuse the delay] No problem. Thanks a lot for the help you're providing. > When I run the install.sh script it overwrites my > > php.ini with the PHP/Java Bridge configuration. > > It doesn't do this if you php installation supports an > /etc/php.d/ directory. Please see the php --configure > help for details (php's configure, not the bridge > configure script). > > > > install.sh created to my original php.ini, the > > extension just doesn't load. > > The only thing the extension need is a > > extension=3Djava.so > > entry. Ok... it took me a while but I finally got it working. It was one of those time when you try hundreds of different things and by the end you don't kno= w if what you're trying you have already done it or not. The thing is that my php.ini was loading the extensions from extension_dir = =3D "/usr/local/php/lib/extensions/" and the java.so was installed on /usr/local/php/lib/extensions/no-debug-non-zts-20050922/ What I don't know is why it didn't work when I copied every file from usr/local/php/lib/extensions/no-debug-non-zts-20050922/ to /usr/local/php/lib/extensions/ Is there any way to change that installation path while configuring PHP/Jav= a Bridge? > In a previous email, Jost told me that PHP/Java > > Bridge does not care about > > CLASSPATH variable, > > Some older JDK may still read the CLASSPATH > environment variable. But since Apache discards all > environment variables and executes in a clean > environment you cannot pass it to the VM (if you want > to run the VM as a sub-component of Apache). Not even using putenv PHP function? Because I use that to configure some Oracle stuff. > getSystemResource method of the ClassLoader > > It should find the resources in the standard Java > repository, which is /usr/share/java/ext or > /usr/java/packages/lib/ext. > > > > So, how should I indicate where those > > Just modify the standard location using the > -Djava.ext.dirs=3D... option. If you want to pass this > option from Apache, use a wrapper script, please see > our FAQ for details. I saw the FAQ... does it mean that I should start Apache with apachectl -D java.ext.dirs=3D/path/to/my/confs ? I would rather work something out that did not envolve having to modify startup configuration. I'm using this to work with a java api, which would be a quite small part o= f a much larger application and would like to make it easier to deploy becaus= e most probably I won't be installing it. BTW: Isn't that backwards? If you want to load > resources from a user dir, why don't you simply use > getResource() instead of getSystemResource()? Might be. I read something like that, the problem is that the getSystemResource call is made from the API I'm working with (which source I don't have), and I have to work with that. Best regards, Andr=E9s Gattinoni ___________________________________________________________ > Der fr=FChe Vogel f=E4ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Ma= il: > http://mail.yahoo.de > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > --=20 Andr=E9s Gattinoni (=AF`=B7._.=B7[El Barto(r)]=B7._.=B7=B4=AF) (...) |
From: <php...@li...> - 2007-03-22 12:43:38
|
Hi, > "/usr/local/php/lib/extensions/" >/usr/local/php/lib/extensions/no-debug-non-zts-20050922/ I don't know where the first, incorrect path comes from . The no-debug-non-zts-20050922 directory is the correct one. > Is there any way to change that installation path > while configuring PHP/Java Bridge? No. php does this automatically. You seem to have two different PHP versions installed. One is patched and uses lib/extension. The other one is the version from which the development files came from. Just remove either one and it will work. > Not even using putenv PHP function? I think this is a general misunderstanding how the environment works. Each process has its own environment. If you use putenv, this will not affect the oracle server nor any other process which has not been started from this particular php instance. Since the php instance terminates after each request (which means that you must not start processes from php instances anyway), the putenv procedure is pretty useless (at least in a web environment). > I saw the FAQ... does it mean that I should start > Apache with apachectl -D > java.ext.dirs=/path/to/my/confs? No. If you want to start Java as a sub process of Apache, and you want to pass your own options to this sub process, you need to write a wrapper binary which exec's java with the parameters you need. Please see the RunJavaBridge wrapper (in the server folder of the source download) for details. > I would rather work something out that did not > envolve having to modify > startup configuration. Why don't you simply start Java via a system service, for example via tomcat? Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2007-03-26 18:32:25
|
>> getSystemResource method of the ClassLoader > It should find the resources in the standard Java > repository, which is /usr/share/java/ext or > /usr/java/packages/lib/ext. I tried placing my config files on: /usr/java/packages/lib/ext /usr/share/java-ext/ /usr/share/pear and in the same location as the php file that loads the class. I can't get it to work. The API I'm trying to implement loads these configuration files using ClassLoader.getSystemResource and I need to figure out some way to load them. Thanks again for your helpful advice. Apart from this I'm making big progress with PHP/Java Brigde and it is being very useful. Regards, Andr=E9s Gattinoni |
From: <php...@li...> - 2007-03-27 09:23:56
|
Hi, > > It should find the resources in the standard Java > > repository, which is /usr/share/java/ext or > > /usr/java/packages/lib/ext. > > I tried placing my config files on: > /usr/java/packages/lib/ext > /usr/share/java-ext/ > /usr/share/pear which java VM do you use and what's the java.ext.dirs setting? Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2007-03-27 19:10:32
|
That was the key I needed Jost! Thank you so much. Now the config files are being loaded by the API from the java.ext.dirs I also successfuly compiled and installed PHP/Java Bridge on Solaris and it's doing very well through the final development stages before going to testing and production. I really appreciate your help and patience. Thanks again, Best regards, Andr=E9s Gattinoni On 3/27/07, php...@li... < php...@li...> wrote: > > Hi, > > > > It should find the resources in the standard Java > > > repository, which is /usr/share/java/ext or > > > /usr/java/packages/lib/ext. > > > > I tried placing my config files on: > > /usr/java/packages/lib/ext > > /usr/share/java-ext/ > > /usr/share/pear > > which java VM do you use and what's the java.ext.dirs > setting? > > > Regards, > Jost Boekemeier > > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > --=20 Andr=E9s Gattinoni (=AF`=B7._.=B7[El Barto(r)]=B7._.=B7=B4=AF) (...) |