Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75890 invoked by uid 1010); 28 Nov 2006 02:21:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75849 invoked from network); 28 Nov 2006 02:21:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Nov 2006 02:21:34 -0000 Authentication-Results: pb1.pair.com header.from=info@ch2o.info; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=info@ch2o.info; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ch2o.info from 212.27.42.27 cause and error) X-PHP-List-Original-Sender: info@ch2o.info X-Host-Fingerprint: 212.27.42.27 smtp1-g19.free.fr Linux 2.4/2.6 Received: from [212.27.42.27] ([212.27.42.27:46807] helo=smtp1-g19.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/E3-43708-6EC9B654 for ; Mon, 27 Nov 2006 21:20:58 -0500 Received: from taris.localnet (stc92-2-82-228-136-150.fbx.proxad.net [82.228.136.150]) by smtp1-g19.free.fr (Postfix) with ESMTP id 2411EABE6; Tue, 28 Nov 2006 03:20:19 +0100 (CET) X-Spam-Status: No, hits=0.0 required=4.0 tests=ALL_TRUSTED: -2.867,AWL: -1.753,BAYES_00: -1.065, HTML_20_30: 0.567,HTML_MESSAGE: 0.001,INFO_TLD: 1.686, UNWANTED_LANGUAGE_BODY: 3 X-Spam-Level: Received: from localhost ([127.0.0.1]) by taris.localnet (Kerio MailServer 6.1.2) for james.aylett@tangozebra.com; Tue, 28 Nov 2006 03:20:17 +0100 Reply-To: info@ch2o.info To: James Aylett ,andi@zend.com,internals@lists.php.net In-Reply-To: <1F6CEC6E7A3BDE459B06BECA190CB0C4F21177@ex-001.twentysixlondon.com> Message-ID: <20061128022016.cb3d1d5a@taris.localnet> Date: Tue, 28 Nov 2006 03:20:16 +0100 X-Mailer: Kerio MailServer 6.1.2 WebMail X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----------flower-power-1cbd81d7310a26a4f7ed61fb990b2767" Subject: Re: [PHP-DEV] Re: [info@ch2o.info] RE: [PHP-DEV] new apache fastcgi implementation and phpfastcgi patch From: info@ch2o.info (Mathieu CARBONNEAUX) References: <1F6CEC6E7A3BDE459B06BECA190CB0C4F21177@ex-001.twentysixlondon.com> ------------flower-power-1cbd81d7310a26a4f7ed61fb990b2767 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =20 Why php cannot be able to be a real application server!=3F :) no, no, no i've not said that... :) ok... =20 no really, separating static from dynamic serving are not in the logic= of reverse proxy apache "scheme" handler implementation who serve by = default all file from path to a backend... my solution work like ProxyPass apache proxy command: ProxyPass / fcgi://my.fscgi.server.com/ =20 if you whant another implementation of apache fastcgi implementation l= ike the old one who serve only file extension is not the way i've choos= e...sorry... I=E2=80=99ve made apache proxy "scheme" handler (like proxy module "f= tp" or "ajp") and is not apache "handler" or "filter" like mod=5Fphp or= mod=5Ffastcgi(the original one).=20 this is a method to make apache module for the apache proxy infrastruc= ture, and make possible to implement "scheme" handler hook that impleme= nt protocol handler like "http:" or "ftp:". is the way I=E2=80=99ve use= d to implement the protocol "scheme" "fcgi:". =20 but with my code base I can be able make "handler" module like the or= iginal one without too much work...=20 but i go to do that after I=E2=80=99ve resolve my need...the reverse p= roxy mode ! =20 and if you have 100 or 200 php instances (and the same number of rever= se proxy in front) to manage...=20 and if you add one apache to each fastcgi server all multiply by 100-2= 00 ...=20 is more complicate to manage and consume more memory(apache processus+= php fastcgi processus*100-200)... if i can suppress apache (or equivalent) in the equation of the php si= de i'm happy...more memory free to php fastcgi... =20 and if i use apache in parallel to php fastcgi why not use directly ap= ache + mod=5Fphp (and always the reverse proxy in front)=20 and with apache + mod=5Fphp this solution consume less memory on php s= ide than apache + fastcgi/php...=20 and is more simple to configure than making apache (or other http solu= tion) for static and php fastcgi for dynamics... =20 my need is to make complete separation between apache and php. =20 And making php a complete application server...like AJP implementation = vs tomcat/jboss like... to make an only one architecture type with mixed application language.= .. (php, tomcat, weblogic, websphere...) =20 and separating static file vs using cache on reverse proxy for caching= static content... in performance i thing is similar... and if is similar with separate it if is more simple manipulate...and = administrate... =20 but why why.... =20 Best Regards, Mathieu =5F=5F=5F=5F=5F =20 From: James Aylett [mailto:james.aylett@tangozebra.com] To: andi@zend.com, info@ch2o.info, internals@lists.php.net Sent: Mon, 27 Nov 2006 08:35:05 +0100 Subject: Re: [PHP-DEV] Re: [info@ch2o.info] RE: [PHP-DEV] new apache fas= tcgi implementation and phpfastcgi patch Further, if you're using apache 2 as your front end reverse proxy, you'l= l be fine running it as your backend static web server as well (in a dif= ferent configuration); it's another instance, not a whole different app = type to monitor. If your monitoring framework can do it in the first lay= er, it can do it in the second as well. The niche for static serving out of the fastcgi process would be where y= ou want more security than one single web server, but you aren't into hu= ge scaling issues where dynamic and static content will be managed separ= ately. I'm not really convinced it's a big niche, though - if you aren't= into huge scaling issues, you can just put a reverse proxy on the front= of your existing web server to get close to the same effect (since secu= rity vulnerabilities in the second layer that are still exposed through = the proxy are liable to be app errors rather than server bugs, so no amo= unt of separation short of an HTTP-speaking proxy or filter is going to = guard against this - at which point we're into a whole different territo= ry of architecture). I agree with the general tone on this thread - while a better fastcgi im= plementation is great, it doesn't need to serve static files. I wouldn't= use it for that. James --=20 James Aylett Chief Technical Architect t 020 7535 9850 f 020 7535 9900 w http://tangozebra.com/ Tangozebra may not be held responsible for the content of this email as it may reflect the personal view of the sender and not that of the company. Should you receive this email in error, please notify the sender immediately and do not disclose copy or distribute it. Tangozebra runs anti-virus software on all servers and workstations, and cannot be held responsible for any infected files that you may receive. Tangozebra advises all recipients to virus scan all emails, and to eat five portions of fruit and vegetable daily. -----Original Message----- From: Andi Gutmans To: info@ch2o.info ; internals@lists.php.net Sent: Mon Nov 27 05:40:15 2006 Subject: RE: [PHP-DEV] Re: [info@ch2o.info] RE: [PHP-DEV] new apache fas= tcgi implementation and phpfastcgi patch I understand the thinking behind this but I still don't understand why P= HP should serve static files. You can still forward static content to the machine running PHP but to a different port as an HTTP request. You can have any Web server of your choice on that machine serving static files, and it can even serve it fr= om the same application layout structure so that application deployment is = not an issue... Andi=20 > -----Original Message----- > From: Mathieu CARBONNEAUX [mailto:info@ch2o.info]=20 > Sent: Sunday, November 26, 2006 3:46 PM > To: internals@lists.php.net > Subject: [PHP-DEV] Re: [info@ch2o.info] RE: [PHP-DEV] new=20 > apache fastcgi implementation and phpfastcgi patch >=20 > hi, >=20 > the reverse proxy way (is complet different way than old=20 > apache fastcgi that is apache handler like mod=5Fphp) of=20 > apache is only proxy that redirect all request to there=20 > backend with new connection (some time with different=20 > protocole than front protocole, ex: https to http, http to ajp...). > the idea of the reverse proxy mode is to deport execution=20 > logic on different machine than the machine who own apache=20 > reverse proxy... > and with deported execution logic, the advantage to handle=20 > static content in php sapi is to deport completly the=20 > deployment of static content out of the apache reverse proxy dmz ...= =20 > and in that way when you deploy new php application, you=20 > deploy all file in only one place... >=20 > and with apache 2+ you can use cache module to cache all=20 > static content in reverse proxy stage, in that way php=20 > fastcgi don't have to make mutch work... >=20 > and the idea is to not add another processus to supervise (is=20 > exploitation in mind) and other technology like other http=20 > server (another competence than "apache" to add to team who=20 > supervise)...=20 >=20 > the apache fastcgi (www.fastcgi.com) is developped with=20 > licence who make dificille to realy make possible to modify=20 > the source in comunity... > some patch exist only in php bug track to correct bug but=20 > they and actualy not apply in apache fastcgi trunk... > the apache fastcgi project are quasi frozen...the last update=20 > are from 14 April 2004... >=20 > is why i've developped this implementation...=20 >=20 > Actualy i've only implemented the handler modele of fastcgi=20 > protocole sp=C3=A9cification... > the seconde stage is to implement authentification modele... > and the 3rds stage is to implement filter modele... > and othe idea for the futur.... >=20 > i'have implemented this module in base of the idea of the=20 > reverse proxy implementation of AJP protocole (tomcat=20 > protocole is very similare to FastCGI protocole...)used in apache 2.2. >=20 > and is the idea of all proxy/plugin module in java=20 > environement like mod=5Fjk, proxy ajp, websphere, weblogic ....=20 > the idea is to separate the exposition to the web to the=20 > execution of web application in two different zone (DMZ). >=20 > in that way you can add mod=5Fsecurity like (for exemple)=20 > module, and with mod=5Fcache (to cache static file) module with=20 > the reverse proxy module (proxy ajp or fastcgi, mod=5Fjk,=20 > was/wls plugin...) in the first dmz...and the application in=20 > the seconde DMZ (php, tomcat, ...)... >=20 > some personne have developped similare module for apache 2.3=20 > dev version... > and i know it for only short time, in fact i've developped=20 > my module in paralelle without knowing the existence of the=20 > other project... but my module is developped for apache 2.0+...=20 > and i've seen the same probleme with other file than php=20 > script in apache 2.3 version...etc... >=20 > i'm ok with you about contributing to apache, but i've sended=20 > mail in the mailing list to contact developper but have no=20 > return... i go to reitere my mail to the list... > but my module can be out of the box of apache trunk beceause=20 > is standard apache module and can be added out of the box to apache. >=20 > but the modification in server fastcgi in scripting language=20 > is embeded to the language... and i've developped the php=20 > fastcgi sapi modification to make possible to use this=20 > version of fastcgi implementation with php... > without this modification the reverse proxy fastcgi=20 > implementation don't work correctly... >=20 > is why a whant to add my contribution to php sapi fastcgi, in=20 > that way i'm not oblige to maintaine patch to php sapi... >=20 > and my modification don't modify cgi implementation and are=20 > completly compatible with the old fastcgi implementation... >=20 > Best Regards, > Mathieu >=20 > =5F=5F=5F=5F=5F =20 >=20 > From: Andi Gutmans [mailto:andi@zend.com] > To: info@ch2o.info, internals@lists.php.net > Sent: Sun, 26 Nov 2006 18:38:39 +0100 > Subject: [info@ch2o.info] RE: [PHP-DEV] new apache fastcgi=20 > implementation and php fastcgi patch >=20 > Making the PHP SAPI extension know how to handle static files=20 > does not sound like the right solution to me. You should be=20 > able to redirect the PHP requests only to PHP's FastCGI=20 > (which already works today incl. remotely), and redirect the=20 > static content to a Web Server (thttpd or something alike). > I personally don't see a great reason adding such a patch to=20 > PHP itself. >=20 > Btw, what are the advantages between your and Apache's=20 > FastCGI implementation=3F This is something you might want to=20 > share with the Apache httpd folks because if it's a good=20 > implementation then it might be nice to contribute it to them. >=20 > Andi > =20 >=20 > > -----Original Message----- > > From: Mathieu CARBONNEAUX [mailto:info@ch2o.info] > > Sent: Sunday, November 26, 2006 2:59 AM > > To: internals@lists.php.net > > Subject: [PHP-DEV] new apache fastcgi implementation and=20 > php fastcgi=20 > > patch > >=20 > > hi every body, > >=20 > > i've developped a new implementation of fastcgi module for apache. > > i'have used the scheme handler of mod=5Fproxy of apache like new=20 > > mod=5Fproxy=5Fajp in apache 2.2... > > the idea is to make possible proxyfy php application behind apache= =20 > > (for security et and performance...). > > to make possible to execute fastcgi in one machine and=20 > apache in other=20 > > machine... separed by firwalle (two DMZ)... > >=20 > > the developpement of the old module as been stoped... > >=20 > > is why i've decide to reimplemente all in new code with decente=20 > > licence (apache 2 licence...for the moment...) > >=20 > > but in this way php receve all request: image, binary file, static= =20 > > file...and also php file... > > for the php file no probleme... but for binary and image...=20 > > they try to interpret systematicly... > >=20 > > to evitate this i've modify the fastcgi sapi to handle this in the= =20 > > good way... > > they only execute by the php interpreter file with a list=20 > of extension=20 > > (.php .php4 .php5...) all other file are served directly... > > i've also modify the sapi to handle index file (index.html=20 > > index.php...)... > >=20 > > i have some dev to add new parametterer in php.ini to handle this=20 > > addition... > > but after how i can add to php trunck my dev =3F > >=20 > > they modify only php cgi/fastcgi sapi ! > >=20 > > my code are her: http://mproxyfcgi.sourceforge.net/ > >=20 > > Best Regards, > > Mathieu > > =20 >=20 > =20 --=20 PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =20 ------------flower-power-1cbd81d7310a26a4f7ed61fb990b2767--