1

I am trying to install Magento CE V2.2.6 on a CentOS server.

Readiness check says bcmath and intl PHP extensions are not installed.

Hosting provider says they are. php -m lists them

$ php -m bcmath
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl

However they are not listed on phpinfo output, so I wrote this code snippet and...

<?php
echo "curl: ", extension_loaded ("curl") ;
echo "<br>";
echo "intl: ", extension_loaded ("intl") ;
echo "<br>";
echo "bcmath: ", extension_loaded ("bcmath") ;
echo "<br>";
echo "mcrypt: ", extension_loaded ("mcrypt") ;
?>

It returns -

curl: 1
intl: 
bcmath: 
mcrypt: 1

So I don't understand why they are installed according to php -m but they are NOT installed for php code, and neither it seems neither does my hosting provider.

I see several questions relating to this problem, but none with these exact symptoms. The replies generally say "install bcmath and intl", but here php -m says they ARE installed.

Any help would be appreciated.


I am using Chrome 69 on Ubuntu. Using ssh to run commands.

php -v
PHP 7.0.32 (cli) (built: Sep 13 2018 16:50:42) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.0, Copyright (c) 2002-2018, by ionCube Ltd.
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

phpinfo snippet

I notice that the /etc/php.d folder has 2 files: 20-bcmath.ini and 20-intl.ini but these files are NOT listed in the "additional .ini files parsed" section of phpinfo.

5
  • You have to contact your hosting to enable this extension properly
    – Amit Bera
    Commented Oct 1, 2018 at 17:38
  • php -m says they are
    – Chris L
    Commented Oct 1, 2018 at 17:41
  • i think have some issue .The hint coming from your post I notice that the /etc/php.d folder has 2 files: 20-bcmath.ini and 20-intl.ini but these files are NOT listed in the "additional .ini files parsed" section of phpinfo.
    – Amit Bera
    Commented Oct 1, 2018 at 17:43
  • PHP cli might be configured differently from the FPM/FastCGI version. php -m = cli version (modules enabled). Do your php files / code snippets return the same result in cli and browser, or does it differ?
    – hey
    Commented Oct 1, 2018 at 21:49
  • PHP commands in cli return that the modules are loaded! $ php -a Interactive shell php > echo "intl: ", extension_loaded ("intl") ; intl: 1 php > echo "bcmath: ", extension_loaded ("intl") ; bcmath: 1
    – Chris L
    Commented Oct 1, 2018 at 22:06

2 Answers 2

1

There would be possible that multiple PHP version installed on server. Does your server is dedicated or shared hosting? Do you able check php version with command line as well as browser and path of PHP.ini file. So we can get better idea

1
  • Shared hosting, I think, in a container.
    – Chris L
    Commented Oct 1, 2018 at 17:06
0

I passed the info from @where to my hosting provider and they fixed the problem right away. Seems like the FPM/FastCGI php was configured differently to the cli version.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.