Edit report at https://bugs.php.net/bug.php?id=61458&edit=1

 ID:                 61458
 User updated by:    lsiden at gmail dot com
 Reported by:        lsiden at gmail dot com
 Summary:            unixtojd() undefined
 Status:             Not a bug
 Type:               Bug
 Package:            Date/time related
 Operating System:   SunOS 5.10
 PHP Version:        5.3.10
 Block user comment: N
 Private report:     N

 New Comment:

Thank you.  Got it.  May close this.


Previous Comments:
------------------------------------------------------------------------
[2012-03-20 23:00:24] ras...@php.net

--enable-calendar=shared doesn't mean the extension is enabled. It means it was 
built shared. Without an extension=calendar.so in your php.ini it won't be 
loaded.

------------------------------------------------------------------------
[2012-03-20 21:08:00] lsiden at gmail dot com

Description:
------------
Since upgrading from PHP 5.2.9 to 5.3.10, PHP is throwing the error:

... PHP Fatal error:  Call to undefined function unixtojd() in .../unixtojd.php 
on 
line 5

Checking phpinfo(), I can see that the calendar lib is enabled:
'--enable-calendar=shared' 

Searching on Google for posts since the first release of PHP 5.3 (June 30, 
2009) 
did not reveal much more: http://goo.gl/2YbWj

If anyone has an answer, please notify me 
Thank you!

Test script:
---------------
<pre>
<?
$time = time();
echo ( ($time)); echo "\n";
echo unixtojd($time); echo "\n";
//die ("got here");

function showdiff($s1, $s2) {
  echo ("showdiff($s1, $s2)\n");
  $t1 = strtotime($s1);
  $t2 = strtotime($s2);
  //echo unixtojd($t2); echo "\n";
  echo (unixtojd($t2) - unixtojd($t1)); echo "\n";
}

showdiff("1.1.2012 00:00:00 GMT", "15.1.2012 00:00:00 GMT");
showdiff("1.3.2012 00:00:00 GMT", "15.3.2012 00:00:00 GMT");
?>
</pre>


Expected result:
----------------
1332277193
2456007
showdiff(1.1.2012 00:00:00 GMT, 15.1.2012 00:00:00 GMT)
14
showdiff(1.3.2012 00:00:00 GMT, 15.3.2012 00:00:00 GMT)
14

Actual result:
--------------
... PHP Fatal error:  Call to undefined function unixtojd() in .../unixtojd.php 
on 
line 5



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61458&edit=1

Reply via email to