>The Orion-server is supposed to be able to run PHP-script isn't it? Well, I >can't seem to enable the CGIServlet that is mapped to handle PHP. Anyone >done this? What to do? Repeat post..... -Joe Walnes ------------------------------------------------------- Date: Tue, 22 Feb 2000 10:46:14 +0000 To: Orion-Interest <[EMAIL PROTECTED]> From: Joe Walnes <[EMAIL PROTECTED]> Subject: Re: CGI, PHP, etc... >Has anyone successfully managed to get PHP workingwith Orion? Their is some >mention of "com.evermind.server.http.CGIServlet", but that doesn't seem to >come with the Orion package, and the evermind site is in German - or >something - and I can't find the classes. (I only speak english!:p) The CGI Servlet is a wrapper to a fork a native CGI. If you install PHP as a CGI and ensure the php executable is in your PATH before starting orion, it should work. Briefly, Orion has the following Servlet called php setup: <servlet auto-reload="false"> <servlet-name>php</servlet-name> <servlet-class>com.evermind.server.http.CGIServlet</servlet-class> <init-param> <param-name>interpreter</param-name> <param-value>php</param-value> </init-param> </servlet> This calls the CGIServlet telling it to use 'php' as the interpreter for the page. This <param-value> can easily be switched for any other interpreter such as Python, Perl, Bash, Cold-Fusion, Q-Basic(!) etc. If the executable is not in the PATH environment variable, use the full path to the interpreter in the <param-value>. A mapping is then set to map all files that end in .php to the php servlet. <servlet-mapping> <servlet-name>php</servlet-name> <url-pattern>/*.php</url-pattern> </servlet-mapping> That's it really. On another note, the PHP4 beta's 3 and 4 contain some Java mappings which allow java objects to be used directly in php. On top of that, a servlet wrapper has evolved allowing PHP to be invoked from a servlet without having to start a new process each time and have persistent resources (such as db connections and session variables) - greatly improving performance. Have a look in /ext/java/ and /sapi/servlet/ of the PHP distribution for information on this. -Joe Walnes