简体   繁体   中英

Nova on Laradock raises bcadd exception

I have a simple installation of Laravel with Laradock.
When I try to update a model, there is no problem.

However, when I install Nova and try to update some model (for example user name), I get the following error:

在此处输入图片说明

Looking at ajax call, I see the following error:

exception: "Symfony\Component\Debug\Exception\FatalThrowableError"
file: "/var/www/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php"
line: 506
message: "Call to undefined function Moontoast\Math\bcadd()"

I tried to set PHP_WORKER_INSTALL_BCMATH to true in .env and rebuild docker image, but it didn't help.

I also found this issue:
https://github.com/laravel/telescope/issues/25#issuecomment-432302285

But it didn't help me to solve the problem.

For anyone else experiencing this issue this is what solved it for me: bin/bash into docker container and run

docker-php-ext-install bcmath

Then restart server. This helped for my case. I would expect analogical steps would work for Laradock.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM