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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 11:01:32 2024 UTC