Author Topic: need advice to install intl (extension php)  (Read 28928 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
need advice to install intl (extension php)
« on: June 15, 2015, 06:50:33 PM »
Hello,
Can you please tell me how to install the intl extension php (php-intl)?
This extension is needed to be able to run cakephp.
« Last Edit: June 21, 2015, 03:17:10 PM by copernic »

Offline
*
Re: need advice to install intl (extension php)
« Reply #1 on: September 20, 2015, 11:15:52 AM »
If you solved this problem, you can share?
I need reply too.

Offline
**
Re: need advice to install intl (extension php)
« Reply #2 on: September 21, 2015, 06:51:04 AM »
Try using .. yum install php-intl , it should resolve dependencies and install libicu also , then do a service httpd restart and youre good to go

Offline
*
Re: need advice to install intl (extension php)
« Reply #3 on: September 22, 2015, 11:31:06 AM »
Try using .. yum install php-intl , it should resolve dependencies and install libicu also , then do a service httpd restart and youre good to go

Bad Idea so Bad Since php is compiled with extensions ,
All you need to do install Dependencies from php selector then go to your machine console and install libicu-devel

Code: [Select]
yum install libicu-devel
after that add this line :
Code: [Select]
--enable-intl
to compile flags and compile

Example :

Code: [Select]
./configure
--with-zlib
--enable-soap
--enable-intl
--enable-exif
....

After it's done you are good to go ;)

Edit : Since there is several php version available in cwp be careful php-intl is available since php 5.3

If you want to add it to your default php compile go to PHP Version Switcher , click next , in Additional configuration field add --enable-intl , and compile ( before this make sure you installed libicu-devel as i mentioned

If you want to add it to other php versions ( 5.3+ ) go to PHP Version Selector , edit flags add --enable-intl , save and compile
« Last Edit: September 22, 2015, 11:39:01 AM by synxmax »

Offline
*
Re: need advice to install intl (extension php)
« Reply #4 on: April 25, 2016, 12:04:18 AM »
I've done exactly this and still intl does  not show up. any possible reasons?

Offline
*****
Re: need advice to install intl (extension php)
« Reply #5 on: April 25, 2016, 10:17:26 AM »
Hi, check phpinfo(); . Do you have '--enable-intl' in "Configure Command"?
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
***
Re: need advice to install intl (extension php)
« Reply #6 on: September 07, 2017, 02:02:06 PM »
- Login your CWP on browser
- Re compile PHP (use PHP switcher)
- Tick to the check box "intl" to enable this extension

Wait for php to be recompiled then you are good to go

Offline
*
Re: need advice to install intl (extension php)
« Reply #7 on: January 16, 2018, 12:32:02 AM »
- Login your CWP on browser
- Re compile PHP (use PHP switcher)
- Tick to the check box "intl" to enable this extension

Wait for php to be recompiled then you are good to go

hi man, i did this for intl and it works, but now i need to fix this:

(ICU is missing).
(ICU Data is missing).

how can i do ?

Offline
*
Re: need advice to install intl (extension php)
« Reply #8 on: November 10, 2018, 05:00:02 PM »
This is an old thread, i thought i would just add my solution for my environment:

CentOS 7.5 x64
Apache version: Apache/2.4.34
PHP version: 7.1.22 [PHP Switcher]
MySQL version: 10.1.37-MariaDB
------------------------------

Below is what i followed taken from https://unix.stackexchange.com/questions/345106/how-to-install-extenion-php-intl-in-centos7

----------------------------

There are two ways to install php-intl in centos-os (centos ver 2017.09), php version > 7.0

Update system, and try install php-intl directly
Install php-intl through IUS and REMI repositories
1. Update system, and try install php-intl directly
UPDATE SYSTEM command
sudo yum update

INSTALL php70-intl extension
sudo yum install -y php70-intl

2. Install php-intl through IUS and REMI repositories
INSTALL IUS repository (http://iuscommunity.org/pages/Repos.html#release-packages)
cd /opt/
sudo wget https://rhel7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm


If getting epel error like epel-release = 7 is needed by ius-release-1.0-15.ius.el7.noarch you need to install epel-7 through following command, and retry above command

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Update system via
sudo yum update

Retry ius install
sudo rpm -Uvh ius-release*.rpm

After IUS is successfully installed, run update system again through command sudo yum update


INSTALL php-intl THROUGH REMI REPOSITORY

Enable remi (temporarily) and install php-intl
sudo yum --enablerepo=remi install php-intl

IF getting ERROR like "Error getting repository data for remi, repository not found", you need to install remi repository first, then run above command

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

IF getting ERROR like "php70-common-7.0.32-1.31.amzn1.x86_64 conflicts php-common < 5.5.22-1.98" then you need to install php70-intl directly in place of remi repository

sudo yum install -y php70-intl

------------------------------- Above is the instuction from the reference URL ---------------

Also i had a conflict of php_intl version ( 5.4.16-45.el7),

Error showed: "Package php-intl-5.4.16-45.el7.x86_64 already installed and latest version".

so i removed the old version first:

[root@cp ~]# yum remove php-intl

And removed the dependencies:

[root@cp ~]# yum remove  php-common-5.4.16-45.el7.x86_64

Than, list the available package:

[root@cp ~]# yum list php*intl

Installed Packages
php-intl.x86_64                     5.4.16-45.el7                      @base  (This was removed by me earlier)

Available Packages
php54-php-intl.x86_64               5.4.45-15.el7.remi                 remi-safe
php55-php-intl.x86_64               5.5.38-9.el7.remi                  remi-safe
php56-php-intl.x86_64               5.6.38-2.el7.remi                  remi-safe
php56u-intl.x86_64                  5.6.38-1.ius.el7                   ius
php70-php-intl.x86_64               7.0.32-1.el7.remi                  remi-safe
php70u-intl.x86_64                  7.0.32-1.ius.el7                   ius

php71-php-intl.x86_64               7.1.24-1.el7.remi                  remi-safe  (**I need this version)

php71u-intl.x86_64                  7.1.23-1.ius.el7                   ius
php72-php-intl.x86_64               7.2.12-1.el7.remi                  remi-safe
php72u-intl.x86_64                  7.2.11-1.ius.el7                   ius
php73-php-intl.x86_64               7.3.0~rc5-1.el7.remi               remi-safe

// install new php_intl version with its dependencies:

[root@cp ~]# yum install -y php71u-intl.x86_64

-------------
Success Log
-------------

[root@cp ~]# yum install -y php71u-intl.x86_64

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.0x.sg
 * extras: mirror.0x.sg
 * ius: hkg.mirror.rackspace.com
 * remi-safe: mirrors.thzhost.com
 * updates: mirror.0x.sg
Resolving Dependencies
--> Running transaction check
---> Package php71u-intl.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.23-1.ius.el7 for package: ph                                                                                                             p71u-intl-7.1.23-1.ius.el7.x86_64
--> Running transaction check
---> Package php71u-common.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch          Version                    Repository  Size
================================================================================
Installing:
 php71u-intl          x86_64        7.1.23-1.ius.el7           ius        222 k
Installing for dependencies:
 php71u-common        x86_64        7.1.23-1.ius.el7           ius        1.1 M

Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 1.3 M
Installed size: 9.1 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/php71u-common-7.1.23-1.ius.el7.x86                                                                                                             _64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Public key for php71u-common-7.1.23-1.ius.el7.x86_64.rpm is not installed
(1/2): php71u-common-7.1.23-1.ius.el7.x86_64.rpm           | 1.1 MB   00:01
(2/2): php71u-intl-7.1.23-1.ius.el7.x86_64.rpm             | 222 kB   00:01
--------------------------------------------------------------------------------
Total                                              1.0 MB/s | 1.3 MB  00:01
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
 Userid     : "IUS Community Project <coredev@iuscommunity.org>"
 Fingerprint: 8b84 6e3a b3fe 6462 74e8 670f da22 1cdf 9cd4 953f
 Package    : ius-release-1.0-15.ius.el7.noarch (installed)
 From       : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php71u-common-7.1.23-1.ius.el7.x86_64                        1/2
  Installing : php71u-intl-7.1.23-1.ius.el7.x86_64                          2/2
  Verifying  : php71u-common-7.1.23-1.ius.el7.x86_64                        1/2
  Verifying  : php71u-intl-7.1.23-1.ius.el7.x86_64                          2/2

Installed:
  php71u-intl.x86_64 0:7.1.23-1.ius.el7

Dependency Installed:
  php71u-common.x86_64 0:7.1.23-1.ius.el7

Complete!

---

If you spotted error in the output, it may be conflict with older or your existing php_intl installed package version.
Below is my log and what to look out for:

Error in the output i spotted that made me removed the conflict package
---

[root@cp ~]# yum install -y php71u-intl.x86_64

Resolving Dependencies
--> Running transaction check
---> Package php71u-intl.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.23-1.ius.el7 for package: ph                                                                                                             p71u-intl-7.1.23-1.ius.el7.x86_64
--> Running transaction check
---> Package php71u-common.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Conflict: php71u-common-7.1.23-1.ius.el7.x86_64 conflicts php-com                                                                                                             mon < 7.1.23-1.ius.el7
--> Finished Dependency Resolution

Error: php71u-common conflicts with php-common-5.4.16-45.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

*** Above showed conflict package to remove

[root@cp ~]# yum remove  php-common-5.4.16-45.el7.x86_64

--------------------------------------------------------------------------

After I installed the intl package, i logged in to CWP and use the PHP Version Switcher and ticked intl extension
and click save and build button.

After some time (30 minutes), i check that the building is completed from the alert message and log.
I restarted the apache, and clicked php info and the intl was shown on the page (before that it was not there).

The installation script that checked for intl also no longer prompted error for INTL not found.