Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16731 invoked from network); 2 Sep 2016 12:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2016 12:48:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=andreas@heigl.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andreas@heigl.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain heigl.org from 195.191.240.18 cause and error) X-PHP-List-Original-Sender: andreas@heigl.org X-Host-Fingerprint: 195.191.240.18 hos109.unaxus.net Received: from [195.191.240.18] ([195.191.240.18:59674] helo=hos109.unaxus.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/35-19490-10579C75 for ; Fri, 02 Sep 2016 08:48:03 -0400 Received: from [212.185.30.151] (port=63063 helo=wdv-hg-0C07-zX4090-HeiglAndreas.local) by hos109.unaxus.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1bfnsi-002TBN-7q; Fri, 02 Sep 2016 14:47:43 +0200 To: Jordan Gigov , internals@lists.php.net References: Message-ID: <3818ee78-9795-ce5e-6a0a-703e45cd904a@heigl.org> Date: Fri, 2 Sep 2016 14:47:40 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms070202080109080304070308" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hos109.unaxus.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heigl.org X-Get-Message-Sender-Via: hos109.unaxus.net: authenticated_id: a.heigl+heigl.org/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hos109.unaxus.net: a.heigl@heigl.org Subject: Re: [PHP-DEV] Non-conflicting PHP 5 and 7 builds From: andreas@heigl.org (Andreas Heigl) --------------ms070202080109080304070308 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jordan. Great Idea. There are just a few questions I have: * Is it possible to extend that system also to minor and patch versions? * What effect has that on docker or vagrant systems? Especially on maintainability of up-to-date versions that will have to symlink the current version to a new binary with every version? * what effect would that have on non-release versions? For our development it has been intresting to be able to switch between different minor and patch-versions of PHP so we use vagrant or docker for different projects depending on the PHP-Version available on the productive servers. That can then also include extensions and so on. Alternatively I've used the prefix to distinguish between the versions and then created symlinks to the binaries inside a bin-folder. When that was necessary at all, as f.e. php-fpm can be called right inside the respective prefiexed folder... And then there's also phpenv which took rbenv as a model. Cheers Andreas Am 02.09.16 um 14:28 schrieb Jordan Gigov: > 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 t= he > headers in ${prefix}/includes/. >=20 > 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. >=20 > Here are the links: >=20 > https://github.com/coladict/php-src/tree/php5-migration > https://github.com/coladict/php-src/tree/php7-migration >=20 > These change the install destinations like so: > ${prefix}/bin/php =3D> ${prefix}/bin/php[5 or 7] > ${prefix}/bin/phpize =3D> ${prefix}/bin/php[5 or 7]ize > ${prefix}/bin/php-config =3D> ${prefix}/bin/php[5 or 7]-config > ${prefix}/bin/php-cgi =3D> ${prefix}/bin/php[5 or 7]-cgi > ${prefix}/bin/phpdbg =3D> ${prefix}/bin/php[5 or 7]dbg > ${prefix}/bin/phar =3D> ${prefix}/bin/phar[5 or 7] > ${prefix}/bin/phar.phar =3D> ${prefix}/bin/phar[5 or 7].phar >=20 > I have also added a "install-alternatives" make target that creates sof= t > links to the legacy locations. > In systems that have "update-alternatives" like Debian, Ubuntu or Fedor= a it > uses it to generate the links, otherwise it falls-back to "ln -s". >=20 > In addition these both contain fixes for gd, gmp and ldap extensions th= at > fail to build under Ubuntu 16.04. >=20 > Tested under Docker containers of ubuntu:xenial, fedora and dock0/arch > (Archlinux). > Additional configure options used when testing: > --with-pic --enable-cli --enable-phpdbg --disable-fpm --with-apxs2=3Dno= > --build=3Dx86_64-linux-gnu --with-layout=3DGNU >=20 > I don't know why automatic detection always yields x86_64-unknown-linux= -gnu > for build under Ubuntu, but that's not particular to PHP. >=20 > Shared extensions that are also built and loaded without error during t= he > testing: > mbstring gd mysqlnd mysqli pdo_mysql curl gettext pgsql pdo_pgsql xmlrp= c bz2 > xsl enchant interbase pdo_firebird mcrypt pspell gmp ldap readline reco= de > tidy >=20 >=20 > Making separately building mysqlnd work as shared should really come wi= th > it's own instructions. I had to use this complicated stuff > ./configure --build=3Dx86_64-linux-gnu --with-pic --enable-mysqlnd \ > CFLAGS=3D"-I/usr/include/openssl -I$(dirname $(dirname $(pwd))) > -DCOMPILE_DL_MYSQLND -DMYSQLND_SSL_SUPPORTED -DMYSQLND_COMPRESSION_WANT= ED > -DMYSQLND_COMPRESSION_ENABLED -DMYSQLND_HAVE_SSL" \ > PHP_OPENSSL=3D"/usr/local /usr" --with-libdir=3Dlib/x86_64-linux-gnu >=20 > Under Fedora that libdir option changes to --with-libdir=3Dlib64 >=20 --=20 ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andreas@heigl.org N 50=C2=B022'59.5" E 08=C2=B0= 23'58" | | http://andreas.heigl.org http://hei.gl/wiFKy7 | +---------------------------------------------------------------------+ | http://hei.gl/root-ca | +---------------------------------------------------------------------+ --------------ms070202080109080304070308 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG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