This cal_days_in_month()
is not working in PHP version 5.2.11
$days_in_month = cal_days_in_month(0,$month,$year);
Try
date('t', mktime(0, 0, 0, $month, 1, $year));
And I found in internet that it require PHP to compile with calender support.
"recompile php with the "--enable-calendar" option."
Having the same problem in a docker container (based on image php:7.4-apache-buster
) adding following line in Dockerfile
solved the problem:
RUN docker-php-ext-install calendar
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