From: <php...@li...> - 2006-05-04 19:18:55
|
On Thu, 2006-05-04 at 19:37 +0200, php...@li... wrote: > + try { > + Method m = System.class.getMethod("getenv", > EMPTY_PARAM); > + Map map = (Map) m.invoke(System.class, > EMPTY_ARG); > + defaultEnv.putAll(map); > + } catch (Exception e) {/*ignore*/} > + return defaultEnv; > > Please see PR1481993 for details. Thanks for the reply. This looks like a good solution to me. I had only been concerned about the path, but it seems appropriate to have the rest of the environment available as well. This also seems like a good approach for JDK 1.4 compatibility, or in case you want to limit CGI access to the system (you could override and supply a limited path, for example). If you have a patch file, I would be happy to test it out. > I usually start php in FastCGI server mode outside of > java, using the command: > > export X_JAVABRIDGE_OVERRIDE_HOSTS=/ > php-cgi -b127.0.0.1:9667 > > AFAIK the FCGI server mode is currently not available > on windows, but this might change in the future; the > FCGI sapi is still being developed. > Yes, the windows php-cgi.exe doesn't seem to recognize the "-b" flag. Unfortunately my environment is currently limited to a windows server. Hopefully that will change in the future as well. ;) Let me know if there is anything else I can do to help. Thanks, Gary |