Re: SV: Orionserver php

2000-12-13 Thread Joe Walnes


what exactly do you mean by "compile PHP as a servlet"? Isnt PHP written in
C/C++?

It's written in C and comes with different wrappers for executing it, the 
most common being a standalone CGI process or compiled into Apache as a module.

However, there is also a Servlet wrapper, which uses JNI to bind to the 
native code. The advantages of using this over the standalone CGI 
executable are:

- Speed (a new process does not need to be forked for each request, and the 
engine is reused)
- Access to Java objects - PHP can construct objects, access attributes, 
methods and properties.
- Request, Response, Session, RequestDispatcher, etc objects available to 
PHP page
- Runs in same context. Calls to EJBs do not have to be passed over RMI

The downside to running PHP as a Servlet is that it's tricky to install, 
and because it uses JNI it's not protected by the VM.

There will be a howto for setting this up appearing on orionsupport.com 
within the next few days if you're interested.

-Joe Walnes





Re: SV: Orionserver php

2000-12-13 Thread Christian Sell

ha, interesting indeed (not that I intend to migrate my programming to PHP,
I am quite happy with JSP right now, but still...)


- Original Message -
From: "Joe Walnes" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 10:30 AM
Subject: Re: SV: Orionserver  php



 what exactly do you mean by "compile PHP as a servlet"? Isnt PHP written
in
 C/C++?

 It's written in C and comes with different wrappers for executing it, the
 most common being a standalone CGI process or compiled into Apache as a
module.

 However, there is also a Servlet wrapper, which uses JNI to bind to the
 native code. The advantages of using this over the standalone CGI
 executable are:

 - Speed (a new process does not need to be forked for each request, and
the
 engine is reused)
 - Access to Java objects - PHP can construct objects, access attributes,
 methods and properties.
 - Request, Response, Session, RequestDispatcher, etc objects available to
 PHP page
 - Runs in same context. Calls to EJBs do not have to be passed over RMI

 The downside to running PHP as a Servlet is that it's tricky to install,
 and because it uses JNI it's not protected by the VM.

 There will be a howto for setting this up appearing on orionsupport.com
 within the next few days if you're interested.

 -Joe Walnes







Orionserver php

2000-12-12 Thread Hernetkoski, Jukka

Hello folks,

has anyone mixed orionserver and php?

If you don't want to install Apache,
but enable php, will it run over orionserver?

Regards, Jukka




Re: Orionserver php

2000-12-12 Thread Joe Walnes

Yes it does, and very well indeed. Nice thing is that PHP can interact with 
Java objects (such as EJB's) so it makes for a nice presentation layer.

I await the flames.

-Joe Walnes

At 10:19 12/12/2000 +0200, you wrote:
Hello folks,

has anyone mixed orionserver and php?

If you don't want to install Apache,
but enable php, will it run over orionserver?

Regards, Jukka





SV: Orionserver php

2000-12-12 Thread Klaus . Myrseth

This is actually VERY easy to do, just compile a normal php cgi executable
without apache integration and install it in your path...

Dont touch anything in orion, but restart it... Then make a file in your
default webapp or something containing the following to test if it works:

info.php - filename
contents:
?php
info();
?

If this shows a nice page with php information youre off and running :)

Klaus Myrseth

-Opprinnelig melding-
Fra: Joe Walnes [mailto:[EMAIL PROTECTED]]
Sendt: 12. desember 2000 13:07
Til: Orion-Interest
Emne: Re: Orionserver  php


Yes it does, and very well indeed. Nice thing is that PHP can interact with 
Java objects (such as EJB's) so it makes for a nice presentation layer.

I await the flames.

-Joe Walnes

At 10:19 12/12/2000 +0200, you wrote:
Hello folks,

has anyone mixed orionserver and php?

If you don't want to install Apache,
but enable php, will it run over orionserver?

Regards, Jukka





Re: Orionserver php

2000-12-12 Thread Joseph B. Ottinger

You're a dork!

On Tue, 12 Dec 2000, Joe Walnes wrote:

 Yes it does, and very well indeed. Nice thing is that PHP can interact with 
 Java objects (such as EJB's) so it makes for a nice presentation layer.
 
 I await the flames.
 
 -Joe Walnes
 
 At 10:19 12/12/2000 +0200, you wrote:
 Hello folks,
 
 has anyone mixed orionserver and php?
 
 If you don't want to install Apache,
 but enable php, will it run over orionserver?
 
 Regards, Jukka
 
 
 

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://cupid.suninternet.com/~joeo  HOMES.COM Developer





Re: SV: Orionserver php

2000-12-12 Thread Joe Walnes

Or, if you're feeling daring...

Compile PHP as a servlet and then place the classes and necessary 
servlet-mappings in your web-app.

Then from your PHP, you can do stuff like:

%
$ctx = new Java("javax.naming.InitialContext");
$myHome = $ctx-lookup("ejb/MyBean");
$me = $myHome-findByPrimaryKey($id);
%

Name: %= $me-name %
Age: %= $me-age %

(hypothetical example).

It's nice because servlet/JSP controllers can forward to or include PHP 
pages as if they are normal servlet/JSP pages, and PHP can access EJB's, 
ServletRequest, etc etc. Useful when Java is too scarey for web-developers.


-Joe

At 13:35 12/12/2000 +0100, [EMAIL PROTECTED] wrote:
This is actually VERY easy to do, just compile a normal php cgi executable
without apache integration and install it in your path...

Dont touch anything in orion, but restart it... Then make a file in your
default webapp or something containing the following to test if it works:

info.php - filename
contents:
?php
info();
?

If this shows a nice page with php information youre off and running :)

Klaus Myrseth

-Opprinnelig melding-
Fra: Joe Walnes [mailto:[EMAIL PROTECTED]]
Sendt: 12. desember 2000 13:07
Til: Orion-Interest
Emne: Re: Orionserver  php


Yes it does, and very well indeed. Nice thing is that PHP can interact with
Java objects (such as EJB's) so it makes for a nice presentation layer.

I await the flames.

-Joe Walnes

At 10:19 12/12/2000 +0200, you wrote:
 Hello folks,
 
 has anyone mixed orionserver and php?
 
 If you don't want to install Apache,
 but enable php, will it run over orionserver?
 
 Regards, Jukka





Re: SV: Orionserver php

2000-12-12 Thread Christian Sell

what exactly do you mean by "compile PHP as a servlet"? Isnt PHP written in
C/C++?

- Original Message -
From: "Joe Walnes" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Tuesday, December 12, 2000 3:14 PM
Subject: Re: SV: Orionserver  php


 Or, if you're feeling daring...

 Compile PHP as a servlet and then place the classes and necessary
 servlet-mappings in your web-app.

 Then from your PHP, you can do stuff like:

 %
 $ctx = new Java("javax.naming.InitialContext");
 $myHome = $ctx-lookup("ejb/MyBean");
 $me = $myHome-findByPrimaryKey($id);
 %

 Name: %= $me-name %
 Age: %= $me-age %

 (hypothetical example).

 It's nice because servlet/JSP controllers can forward to or include PHP
 pages as if they are normal servlet/JSP pages, and PHP can access EJB's,
 ServletRequest, etc etc. Useful when Java is too scarey for
web-developers.


 -Joe

 At 13:35 12/12/2000 +0100, [EMAIL PROTECTED] wrote:
 This is actually VERY easy to do, just compile a normal php cgi
executable
 without apache integration and install it in your path...
 
 Dont touch anything in orion, but restart it... Then make a file in your
 default webapp or something containing the following to test if it works:
 
 info.php - filename
 contents:
 ?php
 info();
 ?
 
 If this shows a nice page with php information youre off and running :)
 
 Klaus Myrseth
 
 -Opprinnelig melding-
 Fra: Joe Walnes [mailto:[EMAIL PROTECTED]]
 Sendt: 12. desember 2000 13:07
 Til: Orion-Interest
 Emne: Re: Orionserver  php
 
 
 Yes it does, and very well indeed. Nice thing is that PHP can interact
with
 Java objects (such as EJB's) so it makes for a nice presentation layer.
 
 I await the flames.
 
 -Joe Walnes
 
 At 10:19 12/12/2000 +0200, you wrote:
  Hello folks,
  
  has anyone mixed orionserver and php?
  
  If you don't want to install Apache,
  but enable php, will it run over orionserver?
  
  Regards, Jukka