Mike vG.
Mike vG.

Reputation: 31

PHP7: Unable to load dynamic library 'intl'

I'm trying to upgrade my wamp server from php5 to php7 (I know I'm a little behind times) and on server startup I'm getting this error

PHP Startup: Unable to load dynamic library 'intl' (tried: C:\PHP73\ext\intl (The specified module could not be found.), C:\PHP73\ext\php_intl.dll (The specified module could not be found.)) in Unknown on line 0

I've tried searching various places on the web for an answer, but nothing seems to work.

I have apache 2.4 and php 5.6 installed and working and I'm trying to upgrade to php 7.2. I've completely commented out all references to php5 in apache httpd.conf and replaced it with php7

#LoadModule php5_module "C:/PHP56/php5apache2_4.dll"
LoadModule php7_module "C:/PHP72/php7apache2_4.dll"
...
#PHPIniDir "C:/php56"
PHPIniDir "C:/php72"

I have my php extensions in C:\PHP72\ext, and the dll file is in there:

C:\PHP72\ext>dir
Volume in drive C is TAFO
Volume Serial Number is 0C3B-1BE9

Directory of C:\PHP72\ext

01/31/2019  11:07 AM    <DIR>          .
01/31/2019  11:07 AM    <DIR>          ..
01/09/2019  02:58 PM            86,528 php_bz2.dll
01/09/2019  02:58 PM            90,624 php_com_dotnet.dll
01/09/2019  02:58 PM           521,728 php_curl.dll
01/09/2019  02:58 PM           148,480 php_dba.dll
01/09/2019  02:58 PM            24,576 php_enchant.dll
01/09/2019  02:58 PM            70,144 php_exif.dll
01/09/2019  02:58 PM         5,017,088 php_fileinfo.dll
01/09/2019  02:58 PM            54,272 php_ftp.dll
01/09/2019  02:58 PM         1,687,040 php_gd2.dll
01/09/2019  02:58 PM            54,272 php_gettext.dll
01/09/2019  02:58 PM           331,264 php_gmp.dll
01/09/2019  02:58 PM           913,920 php_imap.dll
01/09/2019  02:58 PM            78,848 php_interbase.dll
01/09/2019  02:58 PM           393,728 php_intl.dll
01/09/2019  02:58 PM           235,520 php_ldap.dll
01/09/2019  02:58 PM         1,402,368 php_mbstring.dll
01/09/2019  02:58 PM           108,032 php_mysqli.dll

I'm referencing the full path in the php.ini:

extension_dir = "C:\\PHP72\\ext"

Yet whenever I restart or start the server I get the "Unable to load dynamic library" message. I am using functions from the intl library so I can't just comment it out. All the other modules are loading fine.

How can I fix this, or even know why it isn't loading? Thanks.

Upvotes: 1

Views: 4128

Answers (1)

Mike vG.
Mike vG.

Reputation: 31

Fixed my own problem. After hours of hacking at this I realized that I forgot to add the php7 path to my system variables. Adding that and restarting my computer fixed it.

Upvotes: 2

Related Questions