0

After upgrading php to 5.5, the following error occurs:

PHP Fatal error: Call to undefined function bi_to_str() in /var/www/index.php

I know that it's not a coding error, but it could be a missing library. But could an empty value cause that error? Is there an easy way to load that library using apt-get in Debian?

Shōgun8
  • 482
  • 10
  • 20
  • Possible duplicate of [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – LF00 Sep 19 '19 at 00:34
  • 1
    Sounds like you didn't load the `bigint` library in your upgraded configuration. – Barmar Sep 19 '19 at 00:46
  • https://pecl.php.net/package/big_int – Barmar Sep 19 '19 at 00:48
  • I installed pecl big_int, but i get the same error, nothing has changed: # php -info | grep big PWD => /big_int-1.0.7 _SERVER["PWD"] => /big_int-1.0.7 _ENV["PWD"] => /big_int-1.0.7 – Shōgun8 Sep 19 '19 at 19:36

1 Answers1

0

Well with the help I received in the comments, I was able to come up with a solution.
It seems that it's just the function that is missing. I was able to create a file called big_int.php, fill it with the contents found here, and just link to it using require_once in index.php, like this:

require_once('big_int.php');

All is well. Many thanks to Barmar for the helpful tip.

Shōgun8
  • 482
  • 10
  • 20