php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3167 bcmod() function not working
Submitted: 2000-01-10 18:48 UTC Modified: 2000-05-22 06:29 UTC
From: emichaud at sequoianet dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: linux - red hat
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: emichaud at sequoianet dot com
New email:
PHP Version: OS:

 

 [2000-01-10 18:48 UTC] emichaud at sequoianet dot com
Fatal error: Call to undefined function: bcmod() in /usr/local/apache/htdocs/emu/v1/webu.php3 on line 67

This code works fine on php3.  Fails on php4.  

function elapsedtime($sec){
 $days  = floor($sec / 86400);
 $hrs   = floor(bcmod($sec,86400)/3600);
 $mins  = round(bcmod(bcmod($sec,86400),3600)/60);
 if($days > 0) $tstring = $days . "d,";
 if($hrs  > 0) $tstring = $tstring . $hrs . "h,";
 $tstring = "[" . $tstring . $mins . "m]";
 return($tstring);
}

I compiled php4 with general configuration from README plus mysql support.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-22 06:29 UTC] jah at cvs dot php dot net
bcmath sources can not be included anymore with php4 due to licensing
conflicts.

Please read README.BCMATH in php4 source directory. (The file has been
changing its name lately, so it may be slightly different on your system.)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 00:01:34 2025 UTC