2

I am trying to install this extension

https://php-decimal.io/#installation

to my Windows 10 64bit operating system which uses Laragon as Apache,PHP,MySQL

as the installation instruction focus more on Linux

I make a research on internet to found out a way to install on windows and found out the procedure to install it is by

upon doing this I stumble upon an error after executing 'php --re decimal' to check if the extension have been properly installed

Warning: PHP Startup: Unable to load dynamic library 'decimal' (tried: C:/laragon/bin/php/php-7.2.19-Win32-VC15-x64/ext\decimal (The specified module could not be found.), C:/laragon/bin/php/php-7.2.19-Win32-VC15-x64/ext\php_decimal.dll (The specified module could not be found.)) in Unknown on line 0 Exception:

Extension decimal does not exist

i have tried restarting Laragon and using different version of pecl releases,

when i look at phpinfo() i am unable to see any php-decimal extension installed,

below is the code of the extension i put into php.ini

code_extension_php_decimal.dll

and below is the error that appear

error_extension_decimal_does_not_exists

my php version

php_version_7.2.19

what process am I missing

what is the proper way to install this extension in windows

Thank you

1 Answers1

5

If you are using Laragon with PHP 7.2 VC15-x64 download this pecl release

https://windows.php.net/downloads/pecl/releases/decimal/1.3.0/php_decimal-1.3.0-7.2-ts-vc15-x64.zip

extract then copy to directory

C:\laragon\bin\php\php-7.2.19-Win32-VC15-x64\ext

(this is the default php extension directory, type 'php -i|findstr extension_dir' to get dir if unsure)

also copy the libmpdec.dll file to C:\Windows\System32

restart Laragon and it should work, use this command to check if it have been successfully installed

php --re decimal

for different php version use different pecl release, also check on which VC version and x32 or x64 to make sure you get the correct release version.

farhanz95
  • 185
  • 1
  • 13