Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function cal_days_in_month() error while running from server

Tags:

php

I am running a php project from xampp ,it is running with out any error.When I am trying to run the same project from server it is throwing an error Call to undefined function cal_days_in_month().Is there any permissions that I have to give from server side?

like image 307
sahithi Avatar asked Apr 02 '18 14:04

sahithi


1 Answers

Try

date('t', mktime(0, 0, 0, $month, 1, $year)); 

And I found in internet that it requires PHP to compile with calendar support:

recompile PHP with the "--enable-calendar" option

like image 143
Monil Doshi Avatar answered Oct 02 '22 15:10

Monil Doshi