Missing BC Math or GMP extension in Laravel












0















I am running Laravel 5.7.14 on PHP 7.2-fpm on Ubuntu 16.04.



My code in the local environment was working fine, but once I uploaded it to the production server I got this error message: Missing BC Math or GMP extension.



I have installed both GMP + BC Math. When I run the command php -i | grep -i bcmath I get this:



/etc/php/7.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath support => enabled
bcmath.scale => 0 => 0


When I run php -m I get this:



[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


I have restarted the server multiple times and cleared Laravel's cache but nothing's changing, I keep getting this error message.



What am I missing here? If you need more info do not hesitate to ask.










share|improve this question


















  • 3





    try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

    – apokryfos
    Nov 22 '18 at 20:15











  • @apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

    – Radical_Activity
    Nov 22 '18 at 20:20
















0















I am running Laravel 5.7.14 on PHP 7.2-fpm on Ubuntu 16.04.



My code in the local environment was working fine, but once I uploaded it to the production server I got this error message: Missing BC Math or GMP extension.



I have installed both GMP + BC Math. When I run the command php -i | grep -i bcmath I get this:



/etc/php/7.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath support => enabled
bcmath.scale => 0 => 0


When I run php -m I get this:



[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


I have restarted the server multiple times and cleared Laravel's cache but nothing's changing, I keep getting this error message.



What am I missing here? If you need more info do not hesitate to ask.










share|improve this question


















  • 3





    try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

    – apokryfos
    Nov 22 '18 at 20:15











  • @apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

    – Radical_Activity
    Nov 22 '18 at 20:20














0












0








0








I am running Laravel 5.7.14 on PHP 7.2-fpm on Ubuntu 16.04.



My code in the local environment was working fine, but once I uploaded it to the production server I got this error message: Missing BC Math or GMP extension.



I have installed both GMP + BC Math. When I run the command php -i | grep -i bcmath I get this:



/etc/php/7.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath support => enabled
bcmath.scale => 0 => 0


When I run php -m I get this:



[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


I have restarted the server multiple times and cleared Laravel's cache but nothing's changing, I keep getting this error message.



What am I missing here? If you need more info do not hesitate to ask.










share|improve this question














I am running Laravel 5.7.14 on PHP 7.2-fpm on Ubuntu 16.04.



My code in the local environment was working fine, but once I uploaded it to the production server I got this error message: Missing BC Math or GMP extension.



I have installed both GMP + BC Math. When I run the command php -i | grep -i bcmath I get this:



/etc/php/7.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath support => enabled
bcmath.scale => 0 => 0


When I run php -m I get this:



[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


I have restarted the server multiple times and cleared Laravel's cache but nothing's changing, I keep getting this error message.



What am I missing here? If you need more info do not hesitate to ask.







php laravel ubuntu server gmp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 20:10









Radical_ActivityRadical_Activity

79741437




79741437








  • 3





    try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

    – apokryfos
    Nov 22 '18 at 20:15











  • @apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

    – Radical_Activity
    Nov 22 '18 at 20:20














  • 3





    try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

    – apokryfos
    Nov 22 '18 at 20:15











  • @apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

    – Radical_Activity
    Nov 22 '18 at 20:20








3




3





try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

– apokryfos
Nov 22 '18 at 20:15





try creating a route like e.g. Route::get('info', function () { phpinfo(); }) to make sure the fpm configuration matches the command line configuration. Sometimes the webserver is configured to use a different/older version of PHP than the one the command line is using

– apokryfos
Nov 22 '18 at 20:15













@apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

– Radical_Activity
Nov 22 '18 at 20:20





@apokryfos You were right, how silly I am. It was using php 7.1 instead of 7.2... I thought I upgraded already. Anyways thanks for this. Please make an answer if you want me to accept it :-)

– Radical_Activity
Nov 22 '18 at 20:20












1 Answer
1






active

oldest

votes


















1














Managing multiple PHP versions is sometimes very messy.



If you are on a Linux-like system and try to upgrade PHP versions you sometimes end up with 2 versions on the same system. Not infrequently (especially when you manually have configured the previous version) the newly installed version does not get enabled to use with the webserver. Personally I've also experienced upgrading PHP and getting the apache to use the new version but as a module instead of FPM so you should also be wary of that if you are using apache since again FPM and the PHP module for apache might have different configurations as well.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437503%2fmissing-bc-math-or-gmp-extension-in-laravel%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Managing multiple PHP versions is sometimes very messy.



    If you are on a Linux-like system and try to upgrade PHP versions you sometimes end up with 2 versions on the same system. Not infrequently (especially when you manually have configured the previous version) the newly installed version does not get enabled to use with the webserver. Personally I've also experienced upgrading PHP and getting the apache to use the new version but as a module instead of FPM so you should also be wary of that if you are using apache since again FPM and the PHP module for apache might have different configurations as well.






    share|improve this answer




























      1














      Managing multiple PHP versions is sometimes very messy.



      If you are on a Linux-like system and try to upgrade PHP versions you sometimes end up with 2 versions on the same system. Not infrequently (especially when you manually have configured the previous version) the newly installed version does not get enabled to use with the webserver. Personally I've also experienced upgrading PHP and getting the apache to use the new version but as a module instead of FPM so you should also be wary of that if you are using apache since again FPM and the PHP module for apache might have different configurations as well.






      share|improve this answer


























        1












        1








        1







        Managing multiple PHP versions is sometimes very messy.



        If you are on a Linux-like system and try to upgrade PHP versions you sometimes end up with 2 versions on the same system. Not infrequently (especially when you manually have configured the previous version) the newly installed version does not get enabled to use with the webserver. Personally I've also experienced upgrading PHP and getting the apache to use the new version but as a module instead of FPM so you should also be wary of that if you are using apache since again FPM and the PHP module for apache might have different configurations as well.






        share|improve this answer













        Managing multiple PHP versions is sometimes very messy.



        If you are on a Linux-like system and try to upgrade PHP versions you sometimes end up with 2 versions on the same system. Not infrequently (especially when you manually have configured the previous version) the newly installed version does not get enabled to use with the webserver. Personally I've also experienced upgrading PHP and getting the apache to use the new version but as a module instead of FPM so you should also be wary of that if you are using apache since again FPM and the PHP module for apache might have different configurations as well.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 20:27









        apokryfosapokryfos

        18.5k43056




        18.5k43056






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437503%2fmissing-bc-math-or-gmp-extension-in-laravel%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'