[Xitami] PHP/perl as non-CGI

Marcio Marchini xitami@lists.xitami.org
Thu, 6 Dec 2001 11:31:21 -0500


	If it is just serving the file instead of executing it, add this to your
defaults.cfg:

[Mime]
.php=application/x-httpd-php
.php3=application/x-httpd-php3



	I've had the same problem with regular CGI stuff.

marcio

> -----Original Message-----
> From: xitami-admin@lists.xitami.org
> [mailto:xitami-admin@lists.xitami.org]On Behalf Of Peter
> Sent: December 6, 2001 11:09 AM
> To: xitami@lists.xitami.org
> Subject: Re: [Xitami] PHP/perl as non-CGI
>
>
> I've spent the morning trying to get php running as ISAPI without
> any luck.
> It sure looks like it should work the set-up is very similar to another
> server I use. I don't seem to be getting any errors Xitami is
> servering the
> test page but it is not processing the script.
>
> The FAQ says:
>   1.. First off, make sure Xitami is installed and running.
>   2.. Next, download and install the PHP binary distribution into some
> directory. We'll assume it's c:\php.
>   3.. Add '.php=c:\php\php.exe' to the Filter section of the Xitami
> confguration.
>   4.. Rename the PHP initialisation file, 'php3.ini-dist' to
> 'php3.ini' and
> copy it into the Windows directory. Don't bother trying to set the PHPRC
> environment variable, because this does not seem to work.
>   5.. Edit the ini file and change the 'extension_dir' setting to c:\php.
>   6.. Now test PHP by hand with a small test page, by running it in a
> command window, in the Xitami directory:
> c:\php\php webpages\test.php
>
>
> ----- Original Message -----
> From: "Marcio Marchini" <mqm@magma.ca>
> To: <xitami@lists.xitami.org>
> Sent: Thursday, December 06, 2001 10:28 AM
> Subject: RE: [Xitami] PHP/perl as non-CGI
>
>
> >
> > As far as I know Xitami has LRWP, not FastCGI. LRWP is not
> FastCGI, but it
> > is very similar. "The protocol between Xitami and the LRWP Peer is much
> > simpler than the FastCGI protocol, and therefore less prone to
> > implementation differences or errors. However, given the right
> circumstances
> > it is possible to run the same program as both a LRWP Peer and a FastCGI
> > Peer with only minor differences in the startup code. "
> >
> >
> > So, you'd have to write your own C adapter to be a LRWP/FastCGI server &
> > link to the PHP/Perl interpreter.
> >
> > What I've seen in PHP (and probably Perl) under Win32 is that
> they support
> > the Microsoft way of doing things (ISAPI or something like
> that), which I
> > don't think Xitami supports ? Anyway, under PWS (Personal Web
> Server) and
> > IIS you can probably enable them in this faster mode (ISAPI).
> >
> >
> > Again, maybe by now Xitami supports ISAPI, but I don't think so. I think
> > they don't because they want to be OS-portable, and ISAPI would be
> > Windows-specific. I could be wrong.
> >
> > Zope (www.zope.org) has a regular, thin CGI which then talks to
> Zope on a
> > specific port. So, if you configure Zope behind Apache, you use this
> > small&fast CGI which gets loaded/unloaded for every request, but it is
> > fast/small. It then opens a connection to Zope on a given
> socket, and they
> > exchange data, and the little CGI passes the bytes back to
> Apache. This is
> > another option, but you'd have to write the little CGI yourself
> and leave
> > the PHP or Perl interpreter running, listening for requests on a port
> (like
> > a Java servlet engine, etc). The advantage of this compared to an apache
> MOD
> > is that it is portable across web servers. You can run Zope
> behind any web
> > server just by porting this tiny CGI to the new platform. LRWP, on the
> other
> > ahnd, is Xitami-specific. MODs are Apache-specific. ISAPI is
> > Windows-specific. The Zope solution is very portable with a small
> > performance penalty (lightweight CGI + sockets). There's no
> ideal solution
> > :-)
> >
> > But Zope is designed to be a server & listen on a port, while
> the PHP/Perl
> > interpreters aren't. That's why they need more work, like a C code that
> > links to teh interpreter & does the glue work. It would be nice
> if Xitami
> > supported ISAPI.
> >
> > Sorry I don't have good news. Hope this helps a bit. Note that I may be
> > wrong in some points, it's been a while since I looked into this.
> >
> > marcio
> >
> >
> > > -----Original Message-----
> > > From: xitami-admin@lists.xitami.org
> > > [mailto:xitami-admin@lists.xitami.org]On Behalf Of Vardhan Varma
> > > Sent: December 5, 2001 11:04 PM
> > > To: 'xitami@lists.xitami.org'
> > > Subject: [Xitami] PHP/perl as non-CGI
> > >
> > >
> > >
> > >  Hi,
> > >   I've searched the archive, and while the question of PHP and PERL
> > > as non-CGI (fastcgi/WSX etc and not seperate process executed
> everytime)
> > > has been raised many time, there has
> > > been no post telling 'yes i've done it and here is the url'.
> > >
> > > Does anybody has PHP/perl running as non-CGI in Xitami ?
> > > If yes, are they willing to share the patch .
> > >
> > >
> > > --Thanx
> > > --Vardhan
> > >
> > > --
> > > Xitami Users Mailing List -- For Xitami support
> > > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> > >
> >
> >
> > --
> > Xitami Users Mailing List -- For Xitami support
> > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> >
> >
>
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>