Moodle 3.4.1+ admin/environment/php extension/intl

Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -
Number of replies: 34

Hello, I have this error:

Intl extension is required to improve internationalization support, such as locale aware sorting and international domain names.

I have tried this:

To enable this extension add the following line to your php.ini file usually found in /php:

extension=php_intl.dll

And then set the intl.default_locale and intl.error_level directives in your php.ini file.

[intl]

intl.default_locale = en_utf8

intl.error_level = E_WARNING
but in my php file there are no .dll


; Notes for Windows environments :

;

; - ODBC support is built in, so no dll is needed for it.

; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)

;   extension folders as well as the separate PECL DLL download (PHP 5+).

;   Be sure to appropriately set the extension_dir directive.

;

extension=bz2

extension=curl

extension=fileinfo

extension=gd2

extension=gettext

;extension=gmp

;extension=php_intl.dll (I copy this here)

;extension=imap

;extension=interbase

;extension=ldap

extension=mbstring

extension=exif      ; Must be after mbstring as it depends on it

extension=mysqli

;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client

;extension=openssl

;extension=pdo_firebird

extension=pdo_mysql

;extension=pdo_oci

;extension=pdo_odbc

;extension=pdo_pgsql

extension=pdo_sqlite

;extension=pgsql

;extension=shmop


What shall I do?

Thank you

Average of ratings: -
In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That only applies if your operating system is Windows. 

If not, it depends on how PHP was installed in the first place. For systems like Ubuntu it's usually no more complicated than (something like)...

sudo apt install php-intl

In reply to Howard Miller

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Yes Windows 8.1

In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't know anything about Windows... you did restart it after changing the php.ini file?

In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

By default the DLL files for PHP extensions are in the ext folder within the main PHP folder.

Typically on Microsoft Windows you have the following entry in php.ini so PHP can find them:

extension_dir = "ext"

Then for each extension required you need an entry in php.ini, e.g. for intl:

extension=php_intl.dll

(with no semicolon at the start).

If you're using Apache as a web server you'll need to restart the Apache service to apply any changes made to php.ini.

If you're using IIS as a web server you may need to restart this, e.g. in the IIS Manager console but IIS can be configured to automatically detect changes to php.ini so sometimes this isn't necessary.

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Thanks Leon, 

Can you please let me know how to proceed?

Sorry I am new at this!

Regards

In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers
From your original question it sounds like you've found your php.ini and can edit this file? You should be able to open this file in Notepad and make the changes from my previous post. You may find you need to add other extensions for Moodle to install.

If you want to know how to restart your web server service you'll need to tell us if you're using IIS or Apache (or something else) for the web server. But IIS sites are managed from the standard IIS Manager console and the Apache service can be restart from the Services console. Both should be in Control Panel's Administrative Tools section.

If you're getting stuck with any of the above please let us know exactly where. It would also be useful to know which version of PHP is on the server and where you downloaded this from.
In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Hello Leo, 

yes I found the php.ini and can edit it with Notepad ++

The thing is that there I cannot find any files with the extention .dll

So I don´t know how to proceed.

I have installed XAMPP control panel v3.2.2. (Apache & MySQL)

This is what I have:

extension=bz2

extension=curl

extension=fileinfo

extension=gd2

extension=gettext

;extension=gmp

;extension=imap

;extension=interbase

;extension=ldap

extension=mbstring

extension=exif      ; Must be after mbstring as it depends on it

extension=mysqli

;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client

;extension=openssl

;extension=pdo_firebird

extension=pdo_mysql

;extension=pdo_oci

;extension=pdo_odbc

;extension=pdo_pgsql

extension=pdo_sqlite

;extension=pgsql

;extension=shmop


In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I've just run through this in XAMPP. In php.ini the following lines should be uncommented (i.e. remove the ';' prefix):

extension=intl
extension=openssl
extension=soap
extension=xmlrpc

You then need to stop and start Apache in the XAMPP Control Panel window. If necessary click Reload at the bottom of the Moodle install page that gives you the warning about the missing intl extension to check this message no longer appears.

If you get errors about mysql_full_unicode_support you may need to edit C:\xampp\mysql\bin\my.ini (assuming your XAMPP installation folder is C:\xampp) and add the following lines under the [mysqld] heading:

innodb_file_format=Barracuda
innodb_large_prefix=ON

And then stop and start MySQL in the XAMPP Control Panel window.

If any of this isn't explained clearly or if there are still issues, please reply with details.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Hello Leo, I have tried those 2 things, 

the only error in red i get is this one:

php_extensionintl

Intl extension is required to improve internationalization support, such as locale aware sorting and international domain names.


I tried what you told me but there was no 

extension=intl
In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Screenshot

Attachment ScreenShot.png
In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Mayte Sánchez -

Hello, I have the same problem with Installation - Moodle 3.6.2 (Build: 20190114).

php_intl.dll extension is in the PHP extension folder.

I enclose screenshot with the error and php.ini


Thanks in advance,

Mayte

Moodle error screen

In reply to Mayte Sánchez

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Have you definitely downloaded and installed the 32-bit Visual C++ Redistributable for Visual Studio 2015, vc_redist.x86.exe and not the 64-bit one, vc_redist.x64.exe?

In php.ini you should just need the extension=intl line, you can remove the extension=php_intl.dll line.

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Mayte Sánchez -

Hi, I've already done it but I have the same error.

I'm working with XAMP.

Visual C Installations

In reply to Mayte Sánchez

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Your screenshot doesn't actually show which Microsoft Visual C++ 2015 Redistributable you have, is it x86 or x64?

MSVCRT in Windows Control Panel

You probably need the x86 version but if you've got the newer 64-bit XAMPP release (e.g. xampp-windows-x64-7.3.2-2-VC15-installer.exe) you may need the x64 version. Installing both won't cause a problem so try downloading and installing which ever one you don't have.

Your php.ini still has both of these lines:

extension=intl

extension=php_intl.dll

See my previous reply about removing one of them.

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Mayte Sánchez -

Hi león, thanks a lot!
I'm still having the same problem.

I'm working with XAMPP (xampp-windows-x64-7.3.2-0-VC15), installed bitnami-moodle-3.6.3-0-module-windows-x64  

Installed Visual C++ 2015 x64 and x86


Now I have this error when installing:


And the php_intl.dll is in \xampp\php\ext\php_intl.dll


I'm going crazy with this topic.

Thnks again,

Mayte


In reply to Mayte Sánchez

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

OK you currently have three issues:

1. The problem with the intl extension missing is a XAMPP issue in version 7.3.2-0 (further details). Try using the latest XAMPP, currently 7.3.2-2.

2. You've fixed the duplicate in php.ini for the intl extension. The new error message you've posted shows you've got duplicate lines for two other extensions. Below I've shown the duplicates with the line numbers, remove the two lines as indicated.

     ⋮
 921 extension=openssl
     ⋮
 931 extension=php_xmlrpc.dll    ; Remove this line
     ⋮
 943 extension=xmlrpc
     ⋮
 964 extension=php_openssl.dll    ; Remove this line
     ⋮

3. The new error suggests that the previous attempt to install Moodle failed. I'd suggest renaming config.php (e.g. to config.old), it looks like this should be in C:\xampp\apps\moodle\htdocs. Then try to run the Bitnami Moodle installer again.

If you're still having problems I suggest starting a new forum thread as these are all new issues.

In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

If there's no extension=intl in php.ini add that line somewhere in the list of extension= entries. Then stop and start Apache in the XAMPP Control Panel.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Bright School -

Thank you Leon, I have managed to go to the next page. 

Installation

System


In reply to Bright School

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Claudio Visa -
hola

yo tengo el mismo problema:


In reply to Claudio Visa

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Mike Hall -

¿Qué tipo de sistema operativo tiene Ud?

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by khalid robbani -

thank you so much. it's work for me


i got it in xampp -> config -> php.ini  , edited. 

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Ruchi Dixit -

Thank you, it works!

In reply to Ruchi Dixit

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

Hi,

I have Installation pack for windows from downloads section. On my personal computer is no problem, I just click on start and moodle is working. But on virtual server I use same pack and  it call this error. 

I checket php.ini and indl is OK. 

Where can be a mistake?


Thanks

Attachment Moodle_error.PNG
In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Did you install intl after seeing the error and did you restart apache/iis?  Just because you see it in php.ini does not mean it is actually installed or if you did not restart php, then Moodle is just not seeing it.

In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers
In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

Yes, I have installed both versions for sure. 

In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Open a command prompt window, change to the folder containing PHP in the install package folder and run php --version. E.g. on my server this is:

C:\…>CD C:\Users\Administrator\Moodle\server\php
C:\…>php --version
PHP 7.1.10 (cli) (built: Sep 26 2017 20:07:27) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

What output do you get?

Also which version of Microsoft Windows is running on the VM?

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

I understand where the problem is, but how to fix it?

Attachment moodle.PNG
In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Have you replaced php_intl.dll with another version? The output looks the same as from this post.

If you have you can just download the Windows Install Package again and extract the original file from server\php\ext.

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

I didn't replace anything, for sure I tried to download the original file, but the problem still persists.

In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

If you can supply a directory listing of the ext folder (to check php_intl.dll is the expected 385,024 bytes) and the output of php -i so we can check things like the php.ini file being read. These might be quite long so you can attach them as files.

Also what operating system is in use on the affected server?

In reply to Leon Stringer

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

I think we're going the wrong way. The package is working on PC with win10. But same package on virtual with win server 2012 call that error. Problem must be in services or sw on virtual. 

In reply to Jiří Plachý

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Luis de Vasconcelos -

That error happens for two reasons only:

  1. You are using the wrong version of the php_intl.dll file. If you are running the 32 bit version of PHP then make sure you are using the 32 bit version of the file. Or the 64 bit version for 64 bit PHP. Look in your php.ini file for the setting called extension_dir. What path does it point to? It must be your PHP \ext path. And make sure you are using a version of the php_intl.dll file that corresponds to your PHP version.
  2. You have not installed the correct version of the Microsoft C++ Runtime library. The version on your laptop might not be the version you need to be running on your server. Get the correct version for your server from https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

In reply to Luis de Vasconcelos

Re: Moodle 3.4.1+ admin/environment/php extension/intl

by Jiří Plachý -

You're right with VC from your link it works.  Thanks