php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71169 I get a Fatal error: Call to undefined function bcpow()
Submitted: 2015-12-19 19:06 UTC Modified: 2015-12-19 23:01 UTC
From: janokary at gmail dot com Assigned:
Status: Not a bug Package: BC math related
PHP Version: 7.0.1 OS: heroku ubuntu
Private report: No CVE-ID: None
 [2015-12-19 19:06 UTC] janokary at gmail dot com
Description:
------------
I am using Laravel framework and my application is hosted at Heroku.
Though everything was fine until PHP v7, now in 7.0.1 I get a

FatalThrowableError
Fatal error: Call to undefined function App\Services\ShortUrl\bcpow()



Actual result:
--------------
I looks like bcpow() is not included in php v7.0.1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-19 22:27 UTC] tpunt@php.net
I couldn't replicate this. Have you made sure you've added the BCMath extension as a requirement in your composer.json file?
 [2015-12-19 22:50 UTC] janokary at gmail dot com
-Status: Open +Status: Closed
 [2015-12-19 22:50 UTC] janokary at gmail dot com
I just added the BCMath extension as a requirement in composer.json and now it works. 
I followed this instructions
https://devcenter.heroku.com/articles/php-support#using-optional-extensions
I didn't know that BCMath is optional. I didn't have to do this on previous versions of PHP in heroku.
Anyway, sorry to bother and thanks for your help.
 [2015-12-19 23:01 UTC] nikic@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 05:03:36 2021 UTC