Missing BC Math or GMP extension in Laravel
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
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
add a comment |
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
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
add a comment |
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
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
php laravel ubuntu server gmp
asked Nov 22 '18 at 20:10
Radical_ActivityRadical_Activity
83141639
83141639
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 22 '18 at 20:27
apokryfosapokryfos
20k53464
20k53464
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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