How to enable the intl extension for PHP 7.2 & etc..

Discussion in 'Installation/Configuration' started by blacklevel, Oct 18, 2019.

  1. blacklevel

    blacklevel Member

    I have installed aditional PHP versions to the Debian 9 server, but now I cant enable some extensions for these PHP versions. Only with default php version (7.0) these extensions will works.
    I want to enable the intl extension for PHP 7.2 & etc..

    I have tired simple apt install - not works.
    cd /usr/local/src/php7.2-build
    cd php-7.2.2/
    ./configure --prefix=/opt/php-7.2 --enable-intl

    not helped me...
    Last edited: Oct 20, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. blacklevel

    blacklevel Member

  4. Steini86

    Steini86 Active Member

    If you have compiled it, you have to enable it in your config. Depending on your setup, you should have a "" line somewhere in your phprc file. If I look at that guide, it should be around here:

    If you do not know, how to activate PHP modules, then the self-compiled versions are the wrong solution for you.
    I strongly recommend using the sources for additional PHP versions instead of self compiled versions!
    blacklevel likes this.
  5. blacklevel

    blacklevel Member

    Yes, all added and 100 x checked. Not works for aditional PHP versions...
    Dear @till Please help...
  6. blacklevel

    blacklevel Member

    Yes, u are right,... But It none. It not helps.
    nano /opt/php-7.2/lib/php.ini
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you

    • done ./configure with the --enable stuff?
    • make
    • make install
    • checked there were no errors in the above commands preventing compilation?
    • configured the intl in the right PHP config file?
    • systemctl enable <php-version.service>
    • systemctl daemon-reload
    • systemctl restart <php-version.service>
    How do you verify intl is working / not working?

    I notice that my setup where I used the additional PHP version packages from has php-intl installed only for 5.6 and 7.0, not for 7.1, 7.2 and 7.3. I do not remember why I did not install php-intl for all versions, but there have been no problems, and hosts have non-trivial Wordpress and Joomla sites running.

Share This Page