The intl extension must be accessible by symfony

Right now, if I go to http: // localhost: 8000 / config.php , he will tell me: install and activate the intl extension (used for validators).

So what I did:

Checked the /etc/php/7.0/cli/php.ini file with ;extension=php_intl.dll

Installed symfony/intl in composer.json

And still get a recommendation on installing and enabling the intl extension.

-1
source share
2 answers

make sure you activate extension=php_intl.dll in:

 /etc/php/7.0/apache2/php.ini // ^^^^^^^ 

and also add the extension uncomment the extension by removing the half-column

Download extension

The most common way to load a PHP extension is to include it in your php.ini configuration file. Please note that many extensions are already present in your php.ini, and that you only need to remove them with a comma to activate them.

;extension=php_extname.dll

extension=php_extname.dll

after that you will need to restart apache2

 sudo service apache2 restart 

Update (leave the part above): -

you seem to be using a linux based system specifically debian/ubuntu dist and trying to activate php extension using Windows OS style

to install php intl in debian / ubuntu:

for php 5:

 sudo apt-get install php5-intl 

and for php 7:

 sudo apt-get install php7.0-intl 

just enable the extension:

 sudo php5enmod intl 

or for php7:

 sudo phpenmod intl 

then restart apache

 sudo service apache2 restart 
+4
source

You must remove the semicolon from ;extension=php_intl.dll . Like now; he is commented and will be ignored. This means that it will not include php_intl.dll as an extension.

You can check this example (php.ini documentation) for more information.

0
source

Source: https://habr.com/ru/post/1265943/


All Articles