Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75087 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54967 invoked from network); 26 Jun 2014 10:22:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2014 10:22:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=ingwie2000@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ingwie2000@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.169 as permitted sender) X-PHP-List-Original-Sender: ingwie2000@googlemail.com X-Host-Fingerprint: 74.125.82.169 mail-we0-f169.google.com Received: from [74.125.82.169] ([74.125.82.169:57459] helo=mail-we0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/91-39155-764FBA35 for ; Thu, 26 Jun 2014 06:22:32 -0400 Received: by mail-we0-f169.google.com with SMTP id t60so3425277wes.28 for ; Thu, 26 Jun 2014 03:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gdyrWHgR2NvBfi/Vnf3Sh/VbAzmY1KZImy6Xt2x5JtM=; b=hBl6qscTBm+wO7t7QwdOr/7S7nPi1FQDM72UEviRrOpwhea6ishb9ksNra+9Gh1Wu8 b7yOOUlPeMSnl8RkLN4PSM832nBjvNDp+6wlIp1yptHfmuBRpBifVOvcEEYET5Iq7gSa ClbPubdY9QBuSOlENMZ2DE3DNAwesKJ7+g+YJiUd5seKR/Uho/uoQS9g5qn61CGxgN26 9TwWBz6NnNMBQU+bPClNmZYrlZ/AGOLG0IjrkR/2chMwEdRFLDL4YZQSdLdsMW5bvCrJ J/KxsRT9sjLZk18wxZUUOgcbcC2fj1+7egUvCs1xWcmCDbtJcUClSGcYCmTzt0VW7D3Z +xJQ== X-Received: by 10.194.88.199 with SMTP id bi7mr16881874wjb.79.1403778148625; Thu, 26 Jun 2014 03:22:28 -0700 (PDT) Received: from juergenensimac6.speedport_w723_v_typ_a_1_01_001 (p5B150405.dip0.t-ipconnect.de. [91.21.4.5]) by mx.google.com with ESMTPSA id hc4sm13495609wjc.38.2014.06.26.03.22.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 03:22:28 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <1403777679.12695.14.camel@guybrush> Date: Thu, 26 Jun 2014 12:22:20 +0200 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <05757C4E-9647-49DE-962D-E65AA2A01B71@googlemail.com> References: <1403777679.12695.14.camel@guybrush> To: =?windows-1252?Q?Johannes_Schl=FCter?= X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] Embedding PHP, few additional questions. From: ingwie2000@googlemail.com (Ingwie Phoenix) Am 26.06.2014 um 12:14 schrieb Johannes Schl=FCter = : > Hi, >=20 >=20 > On Thu, 2014-06-26 at 11:50 +0200, Ingwie Phoenix wrote: >> I am working on a nodejs module that allows to embed PHP (to use it >> within HTTP servers, for example). I wish to extend with a small >> thing. Instead of starting, running and shutting down the engine, I >> would like to keep it running, and just reset its state. Why? I >> *think* that this would keep my OPCache. Sadly, I did not find any >> documentation on how OPCache saved its=85cache. Its just ment as a >> matter of speed improvement. >>=20 >> How can I just reset the engine, without shutting it down? >=20 > I don't now what you mean by "reset" PHP is meant to serve requests, = one > after another, where each request has its own context. Probably = youwant > to run request cycles? >=20 >> The embedding instructions that I will use are here: >> http://phi.lv/?p=3D376 >=20 > This sees to use the high level embed APIs. Use > php_request_startup(TSRMLS_C); ... php_request_shutdown((void *) 0); > style loops. See embed API implementation, and a simple SAPI like > = https://github.com/johannes/pconn-sapi/blob/master/pconnect-sapi.c#L180 >=20 > johannes Hey Johannes. With =84reset=93 I was meaning to reset the interpreter and internal VM = - so that my OPCache would be preserved, but the used variables and such = are unset, so the script can run again - but off the cached OP codes, = instead of the script. Is that possible? And thanks, i will look into = that link! Kind regards, Ingwie.=