Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95562 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22984 invoked from network); 2 Sep 2016 13:10:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2016 13:10:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=diogo86@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=diogo86@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.48 as permitted sender) X-PHP-List-Original-Sender: diogo86@gmail.com X-Host-Fingerprint: 209.85.214.48 mail-it0-f48.google.com Received: from [209.85.214.48] ([209.85.214.48:33069] helo=mail-it0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/D5-19490-45A79C75 for ; Fri, 02 Sep 2016 09:10:45 -0400 Received: by mail-it0-f48.google.com with SMTP id e124so10353477ith.0 for ; Fri, 02 Sep 2016 06:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fFMtTUWSgL4VGKiBKofsb4tZKO165jrJeKC52jKk/eU=; b=gkw9afHNtCXalAh6C7dBE66SpnNu6Qw7PK2sWJV7pQUBvQohlhRZ6E1KQWlIWyrRNA hOkKis8ZOxTCj7QoHUuMuoXUeTVZHvLeXRo9114QXAVy5qGhG0mhEYVtRikYt7zEIB+K xGwM+o/d0xgjoK/5P34v/ri4N4hgGKmshFy3lAwsT6QwbGBuqSEiIvm4bcg2WWAEYXwi ZMMEngn7pP2Di0PyqPNz3Kz9K8OJg0O446TYi7Sy9ZZUrW3ai/w17O4S4OYuBpCblOdh 9LQDd7RprI/eJ6inURMrMKa9wQcbW1e2qoZ3ma3pdDrTdoPAXHa6dytTF6JMT4TNuj2l 3TYQ== 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:from:date :message-id:subject:to:cc; bh=fFMtTUWSgL4VGKiBKofsb4tZKO165jrJeKC52jKk/eU=; b=COy0i5vezjIWH3UMFOUiWP7phQ+19KoKMUC52/3lN4TnVxXxriNQunzbacgVlLY5BS V2sIQ8pTEf326m/yd8EoDTU4A/pI5foCi8xtRVVyvM73eVumL4GxR2OrV82leimvpMJ/ hioryBEjafGHFS9CGBDofclNXvD/v6FHs4+4wxYkAxIf8QhWnD+Z4FnJZERhf/WmWXS2 iBiCOblaYK5IIyyvmRUMWERPes6UQbFvV55GIfGBWZWDrYZCbu/EOBoAQ6hv2f1w/0yo OABugf8mj9Gxb+4nh5OuZyw0fZ3Wcp479UucDWVRO1fObC1IZnldA2wPtizDNxOL6Ep0 yNBA== X-Gm-Message-State: AE9vXwM7KwJUe8FQ3HNA+EDFYDSWcB8q6ExOpcXw/yIo5BD/tQLAdRmTYwMMUeQ0s64XUHeokS2+Od7Z+/kZqw== X-Received: by 10.36.95.1 with SMTP id r1mr4937170itb.6.1472821839708; Fri, 02 Sep 2016 06:10:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.39.198 with HTTP; Fri, 2 Sep 2016 06:10:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Sep 2016 10:10:39 -0300 Message-ID: To: Jordan Gigov Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Non-conflicting PHP 5 and 7 builds From: diogo86@gmail.com (=?UTF-8?Q?Diogo_Galv=C3=A3o?=) On Fri, Sep 2, 2016 at 9:28 AM, Jordan Gigov wrote: > Most developers who hope to move a site to PHP 7 will still have to > maintain PHP 5 sites for a long time, requiring the presence of both. > However, building either one, even with the `--program-suffix` > configuration option still overwrites some files, like phpize and all the > headers in ${prefix}/includes/. > > It took me a week to solve this problem for myself and everyone else in our > company, but I have proper working patches for it now. > They have not been submitted as pull requests yet, because I first want to > hear what you think of them. > > Here are the links: > > https://github.com/coladict/php-src/tree/php5-migration > https://github.com/coladict/php-src/tree/php7-migration > Hi, Jordan. I've also been manually keeping different PHP versions installed, but I took another approach: each version has its own prefix in /opt. /opt/php/php-5.6.25 /opt/php/php-7.0.10 And each x.y version is a symlink to the latest release I've tried: /opt/php/php-5.6 -> /opt/php/php-5.6.25 /opt/php/php-7.0 -> /opt/php/php-7.0.10 On some servers and on my own desktop I also keep symlinks in /usr/local/bin to their respective binaries in /opt. I'm mentioning this because it seems to work and doesn't require any change on PHP itself. Unless I'm missing something. This is the script I use to fetch and build new versions: https://github.com/garotosopa/misterbin