Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96032 invoked from network); 13 Jul 2010 14:31:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2010 14:31:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=v.damore@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=v.damore@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: v.damore@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:39649] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/F6-58398-4D87C3C4 for ; Tue, 13 Jul 2010 10:31:48 -0400 Received: by fxm17 with SMTP id 17so3141060fxm.29 for ; Tue, 13 Jul 2010 07:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=mQGGyLyfFbz6apTuoefPD2r129lw3mPaTnrDp5g+6ZY=; b=XGuLJDXpAZ5lrWDnwkDl1uDlvk8nyhVk7VOtPYd8dB6tboeDpZwGxLOP1xACPCQEFq 26yZPEUqz2o1ozgfSj886c3et5BOeQk87zOcHKspxzl1pW3jraSaKOgylJpxyAvNwL1I 7OZelW1+QngqVOvKYZx4+ZKYMOnblUAwi5NX0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=qUEJd2IWYtqp517CXa21mcYusVA3z2escO9NpDz2EJhK6gii4VY4xL7F7AxXivReqd h8Z+1WKX+B36/3/6npsr/KDhxo2uJoRTikIdnCs9/hWzddi6z2F/orO6PLmZd007vWfb GaSgmClJz94+XyYi8ypuQubAEEFsS7u81mx/g= Received: by 10.239.189.72 with SMTP id s8mr1374721hbh.143.1279031505550; Tue, 13 Jul 2010 07:31:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.186.148 with HTTP; Tue, 13 Jul 2010 07:31:25 -0700 (PDT) In-Reply-To: <1279028299.2918.111.camel@samnmax> References: <1279028299.2918.111.camel@samnmax> Date: Tue, 13 Jul 2010 16:31:25 +0200 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Pierre Joye , internals@lists.php.net Content-Type: multipart/alternative; boundary=0016363b9bf88b7c3f048b45ba3e Subject: Re: [PHP-DEV] Re: Performance problem with php From: v.damore@gmail.com ("Vincenzo D'Amore") --0016363b9bf88b7c3f048b45ba3e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Johannes, you are really clear and I finally understand what's the problem. I'm following a big free web hosting service, I would like to enhance performance of customers webspache. What do you think if: - set safe_mode off - remove open_basedir - disable_functions symlink, unlink - w/ functions: passthru, proc_close, proc_get_status, proc_nice, proc, exec, shell_exec, system, proc_open, popen, curl_multi_exec, parse_ini_file, show_source, set_time_limit, error_reporting, mail, fsockopen, ini_set 2010/7/13 Johannes Schl=C3=BCter > On Tue, 2010-07-13 at 15:11 +0200, Vincenzo D'Amore wrote: > > thank you for reading my posts, *could anybody help me to > > understand why realpath cache is disabled if safe_mode or open_basedir > are > > set?* > > For security reasons. > > Assume the following (simplified) code: > > symlink('./bar', 'foo'); > access_bar_in_some_way_to_get_it_cached(); > unlink('bar'); > symlink('/', 'bar'); > do_bad_things_with_bar(); > ?> > > and suddenly you've bypassed the check as for do_bad_things_with_bar() > the cached value is used. Now I hear you say "then invalidate the cache > entries" or something like that, but well, there are so many ways to > achieve such a result (including from outside PHP) that the check won't > be reliable in any way anymore. > > That's the issue one has with security features on application level, > the operating system itself can implement it way more efficiently but > this doesn't (easily) work with a mod_php vhost config (solaris + > mod_privileges would be one way, probably linux + apparmor can do, > too ...) > > johannes > > > --=20 Vincenzo D'Amore email: v.damore@gmail.com msn: freedev@hotmail.com skype: free.dev mobile: +39 349 8513251 --0016363b9bf88b7c3f048b45ba3e--