Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55590 invoked from network); 28 Mar 2014 09:41:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2014 09:41:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.213.54 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.54 mail-yh0-f54.google.com Received: from [209.85.213.54] ([209.85.213.54:55389] helo=mail-yh0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/14-31219-4B345335 for ; Fri, 28 Mar 2014 04:41:08 -0500 Received: by mail-yh0-f54.google.com with SMTP id f73so4749331yha.41 for ; Fri, 28 Mar 2014 02:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IB+U6zwUca1EiRvie2kBrZHzUYyTivcEdmu/COFmSRY=; b=o+70coeJu4kJmU/vLVbWH0/vVpH9MWqdZKhBiS9VshhdhEYj4AeLcseDzmQE3kKEyN luUCz9M2dbkbB84AxWZy8XZDkmqgEChTgNVnJluvvVzBVqLsTYe1LNA9mpfSTgSprhM1 bzUhGeOoiB+R2V4k9u5tsjIz2MN2SGqGgX4Os= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=IB+U6zwUca1EiRvie2kBrZHzUYyTivcEdmu/COFmSRY=; b=B4LvAcFxuR8W7e/ehdhkcp1sCiPzTMKyntOZekVFDAZJT46SVN+HTOMtuL9KY96TFx 3NKM8ln1tPQhkz4w3WoUX6cUgyis1AQtuOIKE76ugwMDml7TV2zgQAZAot7/jfSE0VlK Cr7AO7mfoD4AcxqDy52YUiINXv9GSU2KELHVslrzMRn+AK4NNxXa1zw5ah76UQqaK0/N QVQ6a5POeufC1hIU00MqY36a9nSLXXx0lLCOKIQ6BhonKdbyj9z1dHQk0OCdBTWNxT9k My+NjIYjryhxGJcqxw2wI4JgW9PI1RNtLW36nPqI5rpf+bTOTJSpSfD0sziheUWe+QRj a38Q== X-Gm-Message-State: ALoCoQkn2oCX4nMB6NF0dmNj7zL7IYJnWf9OP2iBbdJ9qLJ4cpbVJd5Cl/3QQNHdUnNPz4ons5DY MIME-Version: 1.0 X-Received: by 10.236.109.99 with SMTP id r63mr9855474yhg.52.1395999665790; Fri, 28 Mar 2014 02:41:05 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Fri, 28 Mar 2014 02:41:05 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Mar 2014 11:41:05 +0200 Message-ID: To: Yasuo Ohgaki Cc: Julien Pauli , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: session_reset() and session_abort() to send errors From: narf@devilix.net (Andrey Andreev) Hi, On Fri, Mar 28, 2014 at 8:54 AM, Yasuo Ohgaki wrote: > Hi Andrey, > > On Wed, Mar 26, 2014 at 1:06 AM, Andrey Andreev wrote: >> >> From what I understand, session_reset() not only discards changes to >> $_SESSION and not just re-reads the data, but re-initializes the whole >> session. This includes calls to open(), read(), which include opening >> file pointers, setting locks, checking session ID validity, etc. I >> don't know how safe that is to do internally, but with a userland >> session handler, it means discarding previously open connections/file >> pointers, locks and whoever knows what else a developer might've >> cached, assuming that open(), read() would only be called once. >> It would've also been better IMO if the function was called >> session_restart() instead, because of the above-described behavior. > > > It's safe. Don't worry. > As always, I prefer better names. Well, I just re-checked it and does indeed just call php_session_initialize(), so what's the point? Shorthand for session_abort() && session_start() ? Cheers, Andrey.