How to fix PHP “Fatal error: Call to undefined function bcmod()” and “Fatal error: Call to undefined function bcdiv()” on FreeBSD

Thursday, 17th March 2011

Reading Time: < 1minute
After some php updates on my 7.2-RELEASE-p4, my lessnmore suddenly stopped working with the following error messages:

Fatal error: Call to undefined function bcmod()
Fatal error: Call to undefined function bcdiv()

A bit of investigation has led me to the root of the problem which was a missing php5-bcmath php extension to solve the error messages and get back my lessnmore shortener to normal I had to issue:

freebsd# cd /usr/ports/math/php52-bcmath
freebsd# make install clean
Hooray it works all now again, Hallelujah!

Share this on:

Download PDFDownload PDF

Tags:

One Response to “How to fix PHP “Fatal error: Call to undefined function bcmod()” and “Fatal error: Call to undefined function bcdiv()” on FreeBSD”

  1. adminsays:
    Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
    Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

    Another possible solution to the:

    Fatal error: Call to undefined function bcmod()
    is the substitution of the funcion bchmod() with fmod()

    This solution doesn’t require the php5-bcmath to be installed even.

    View CommentView Comment

Leave a Reply

CommentLuv badge