Install intl PHP 7.1 extension in a PHP multiple version server

Discussion in 'Installation/Configuration' started by Enrique García, Jan 29, 2017.

  1. Enrique García

    Enrique García New Member

  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    I did not tried it, but it should work

    Code:
    cd /opt/php-7.1/etc
    pecl update-channels
    pecl install intl
    echo extension=intl.so >> /opt/php-7.1/lib/php.ini
     
  3. Hbod

    Hbod New Member

    This won't work for many reasons. pecl install intl would install that for the default PHP Version, not the one inside /opt/. The right way would be to

    > pecl -C ./pear.conf install intl

    But also this won't work, as the compiling intl-source is updated 3 years ago and will complain and terminate compiling
    /tmp/pear/temp/intl/intl_error.h:24:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
    #include <ext/standard/php_smart_str.h>

    as php_start_str was renamed to php_start_string in PHP7. I don't see any way to get this installed. So bad! Any ideas?
     
  4. ahrasis

    ahrasis Member

    Actually there is another option to install multiple php version and use them together via ISPC with your preferred extensions for them, that is via installing ondrej ppa like this:
    Code:
    add-apt-repository ppa:ondrej/php
    apt-get update && apt-get -y upgrade
    Afterwards you install php version that you want i.e. php5.6 to php7.1 as prescribed in the How Tos (Note that php5.5 is no longer supported) something like this:
    Code:
    apt-get -y install php7.1-opcache php7.1-fpm php7.1 php7.1-common php7.1-gd php7.1-mysql php7.1-imap php7.1-cli php7.1-cgi php-pear php-auth php7.1-mcrypt mcrypt imagemagick libruby php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl memcached php-memcache php-imagick php-gettext php7.1-zip php7.1-mbstring
    Then in your ISPC Additional PHP Settings > For FastCGI add something like:
    Code:
    Path to the PHP FastCGI binary = /usr/bin/php-cgi7.1
    Path to the php.ini directory = /etc/php/7.1/cgi
    
    For > PHP-FPM
    Code:
    Path to the PHP-FPM init script = /etc/init.d/php7.1-fpm
    Path to the php.ini directory = /etc/php/7.1/fpm
    Path to the PHP-FPM pool directory = /etc/php/7.1/fpm/pool.d
    
    For some it is easier to add phpVersions and their extensions this way, but for others adding them without relying to ondrej ppa is preferred.

    If your server is still on testing and not on production yet, you may want to give this another-way-around a try. ;)
     
    Last edited: Mar 1, 2017

Share This Page