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 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
> 
> These change the install destinations like so:
> ${prefix}/bin/php => ${prefix}/bin/php[5 or 7]
> ${prefix}/bin/phpize => ${prefix}/bin/php[5 or 7]ize
> ${prefix}/bin/php-config => ${prefix}/bin/php[5 or 7]-config
> ${prefix}/bin/php-cgi => ${prefix}/bin/php[5 or 7]-cgi
> ${prefix}/bin/phpdbg => ${prefix}/bin/php[5 or 7]dbg
> ${prefix}/bin/phar => ${prefix}/bin/phar[5 or 7]
> ${prefix}/bin/phar.phar => ${prefix}/bin/phar[5 or 7].phar
> 
> I have also added a "install-alternatives" make target that creates soft
> links to the legacy locations.
> In systems that have "update-alternatives" like Debian, Ubuntu or Fedora it
> uses it to generate the links, otherwise it falls-back to "ln -s".
> 
> In addition these both contain fixes for gd, gmp and ldap extensions that
> fail to build under Ubuntu 16.04.
> 
> 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=no
> --build=x86_64-linux-gnu --with-layout=GNU
> 
> 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.
> 
> Shared extensions that are also built and loaded without error during the
> testing:
> mbstring gd mysqlnd mysqli pdo_mysql curl gettext pgsql pdo_pgsql xmlrpc bz2
> xsl enchant interbase pdo_firebird mcrypt pspell gmp ldap readline recode
> tidy
> 
> 
> Making separately building mysqlnd work as shared should really come with
> it's own instructions. I had to use this complicated stuff
> ./configure --build=x86_64-linux-gnu --with-pic --enable-mysqlnd \
> CFLAGS="-I/usr/include/openssl -I$(dirname $(dirname $(pwd)))
> -DCOMPILE_DL_MYSQLND -DMYSQLND_SSL_SUPPORTED -DMYSQLND_COMPRESSION_WANTED
> -DMYSQLND_COMPRESSION_ENABLED -DMYSQLND_HAVE_SSL" \
> PHP_OPENSSL="/usr/local /usr" --with-libdir=lib/x86_64-linux-gnu
> 
> Under Fedora that libdir option changes to --with-libdir=lib64
> 


-- 
                                                              ,,,
                                                             (o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl                                                       |
| mailto:andr...@heigl.org                  N 50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org                       http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca                                               |
+---------------------------------------------------------------------+

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to