Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43332 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58806 invoked from network); 12 Mar 2009 16:48:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2009 16:48:55 -0000 Authentication-Results: pb1.pair.com header.from=dpatterson@dplhenterprises.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dpatterson@dplhenterprises.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dplhenterprises.com from 208.43.136.66 cause and error) X-PHP-List-Original-Sender: dpatterson@dplhenterprises.com X-Host-Fingerprint: 208.43.136.66 208.43.136.66-static.reverse.softlayer.com Windows 2000 SP4, XP SP1 Received: from [208.43.136.66] ([208.43.136.66:2006] helo=dplhenterprises.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/35-30999-6FC39B94 for ; Thu, 12 Mar 2009 11:48:54 -0500 Received: from GeneralVM ([68.5.77.14]) by dplhenterprises.com with MailEnable ESMTP; Thu, 12 Mar 2009 09:48:54 -0700 To: "'Bas van Beek'" , Date: Thu, 12 Mar 2009 09:49:06 -0700 Organization: DPLH Enterprises Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 In-Reply-To: Thread-Index: AcmjL4nz5YJpoA7LSte3RzOkcd6U9wAAtzCA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Importance: Normal Subject: RE: [PHP-DEV] embed sapi module and multi-threading From: dpatterson@dplhenterprises.com ("David M. Patterson") References: I for one, would be very interested in such a module :-) Dave > -----Original Message----- > From: Bas van Beek [mailto:bas@tobin.nl] > Sent: Thursday, March 12, 2009 9:26 AM > To: internals@lists.php.net > Subject: [PHP-DEV] embed sapi module and multi-threading > > Hi, > > For a project of mine I had to have an embedded webserver with php > support. For this I've used the boost::asio multi-threaded example as > a base and modified it so I could enable php scripting support. The > first, logical and fast thing to do was to try out the embed sapi > module but I found it to hang on concurrent php_embed_init calls. > > The biggest issue I found was that the embedded module bundles sapi > module startup and request startup. I ended up writing my own SAPI > module as I also needed full support for POST methods, URL queries, > etc. but I can imagine people being interested in having an embedded > sapi which separates module startup/shutdown and request startup/ > shutdown so concurrency works together with being able to have > separate request environments for each thread. > > Separating these calls would allow for the following: > > At program startup initialize the php environment > At each thread startup initialize a php request environment > > With a few minor alterations I could convert my specific sapi module > or current embed module to a generic embed-mt multithread capable > module. > > Would this be something that you are interested in? > > kind regards, > > Bas van Beek > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >