I'm trying to get the easter_date from this year. This is my code:
<?php
$year = date ("Y");
$easter = date ("d-M-Y", easter_date ($year));
echo "Easter " . $year . ": " . $easter . "";
?>
When I execute the code following error appears: Fatal error: Call to undefined function easter_date() in
My phpVersion is 5.3.3. I'm using Linux(Ubuntu).
Have you got an idea what is missing?
If you use a Dockerfile
based on php:7.1
, you can install the calendar
extension easily:
RUN docker-php-ext-install calendar && docker-php-ext-configure calendar
Seems like your php has been compiled without --enable-calendar
support
http://ru.php.net/manual/en/calendar.installation.php
I simply had to enable the calendar extension in php.ini:
extension = calendar.so
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With