Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79095 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46253 invoked from network); 21 Nov 2014 19:06:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Nov 2014 19:06:43 -0000 Authentication-Results: pb1.pair.com header.from=tigran.bayburtsyan@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tigran.bayburtsyan@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.51 as permitted sender) X-PHP-List-Original-Sender: tigran.bayburtsyan@gmail.com X-Host-Fingerprint: 209.85.215.51 mail-la0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:43070] helo=mail-la0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/B3-26013-34D8F645 for ; Fri, 21 Nov 2014 14:06:43 -0500 Received: by mail-la0-f51.google.com with SMTP id mc6so4780882lab.38 for ; Fri, 21 Nov 2014 11:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VD3ogl1XnnE5t6LY9LnXBeuTii5EoZmZtB2OiCxFfBY=; b=yg4WJ9pIJ+2TAnOO3tPnspnR1atMu5cCLal34VMvTimqUD+VFQXnt1DMLSGQGeZtYU C3WSkCIrBTkYFjf7DgIre568nG2AGeGELpHEzwNq+jOvl0lUQBecaB1oO6WfwScXUuH7 /wtD4yAUQLoAZCAjmRcDceT3vdjPXivRNPqegVrZLD3mhPFRh9TnUYB07YP0qL7ltkB7 B1pb0SO+RzrGabRZeZxGTgX6AMg4/Z30GBd6sL1pMMiLLc62W2aHKp7z6vxgLkSaxUQ9 SMRnh2FuNel0uCVj4vhwXDCoc1tCalJcVByAKQINfDn8f6VLn7cvrPzO8xMA92VAs0iZ S2ew== MIME-Version: 1.0 X-Received: by 10.112.27.133 with SMTP id t5mr3468698lbg.45.1416596800499; Fri, 21 Nov 2014 11:06:40 -0800 (PST) Received: by 10.112.147.68 with HTTP; Fri, 21 Nov 2014 11:06:40 -0800 (PST) In-Reply-To: <1416483265.15061.26.camel@kuechenschabe> References: <1416479430.15061.15.camel@kuechenschabe> <1416483265.15061.26.camel@kuechenschabe> Date: Fri, 21 Nov 2014 23:06:40 +0400 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: =?UTF-8?B?5YWwIOiClumygQ==?= , internals@lists.php.net Content-Type: multipart/alternative; boundary=001a1133b04a1576cb0508632530 Subject: Re: [PHP-DEV] PHP SAPI module help From: tigran.bayburtsyan@gmail.com (Tigran Bayburtsyan) --001a1133b04a1576cb0508632530 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for your responses. I saw pconn-sapi it's very similar threaded example that I want to implement. I've crated non blocking Event loop in my C++ application ( it's high load binary API server ) , and now I'm trying to integrate PHP SAPI for writing some customisable scripts using PHP functions. My app starting PHP SAPI with function php_embed_init(argc, argv PTSRMLS_C= C); and it stays alive always , because it will take some preference from my app if I'll start and end PHP SAPI on every PHP script parsing or function call. And based on that now my main problem is that in PHP C++ sources there are a lot of static, global variables which is not useful for me, to clean that all for every request .... So I'm wondering to build something which will help to somehow "save current state" of PHP SAPI , and continue it on every request from saved source, without sharing any variable between multiple requests. Let me know if you didn't get my idea. Now I'm trying to do this thing for my Startup project, but I'll share it over GitHub if I'll have some success :) Thanks. 2014-11-20 15:34 GMT+04:00 Johannes Schl=C3=BCter : > On Thu, 2014-11-20 at 19:19 +0800, =E5=85=B0 =E8=82=96=E9=B2=81 wrote: > > How about writing this logic in an extension? Because u can write > > your own RSHUTDOWN function to protect your data. > > Sorry, I have no idea what logic you want to put in a rshutdown and what > data you want to protect. And how that relates to this discussion around > SAPIs. > > johannes > > > --001a1133b04a1576cb0508632530--