News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Calendar

Started by meccep45, August 25, 2021, 04:01:20 AM

Previous topic - Next topic

meccep45

we go to the calendar and try to change April 1, without leaving the editor, we update the page. we get a lot of beautiful things in the error log.

ManageCalendar.php (Line 300)
mktime(): Epoch doesn't fit in a PHP integer

shadav

what version of php are you using, i'm guessing 8
lower your php to 7.4

Oldiesmann

That shouldn't happen unless you're trying to use a date beyond January 19, 2038 (see https://en.wikipedia.org/wiki/Year_2038_problem for more on that). What specifically are you doing?
Michael Eshom
Christian Metal Fans

meccep45

Quote from: shadav on August 25, 2021, 08:56:04 AMwhat version of php are you using, i'm guessing 8
lower your php to 7.4
I am testing php 8, and everything was fine.

meccep45

Quote from: Oldiesmann on August 25, 2021, 09:41:02 AMThat shouldn't happen unless you're trying to use a date beyond January 19, 2038 (see https://en.wikipedia.org/wiki/Year_2038_problem for more on that). What specifically are you doing?
this is an annual holiday that causes an error

shadav

Quote from: meccep45 on August 25, 2021, 02:12:47 PM
Quote from: shadav on August 25, 2021, 08:56:04 AMwhat version of php are you using, i'm guessing 8
lower your php to 7.4
I am testing php 8, and everything was fine.
I am not entirely sure that 2.1rc4 is made to work with php 8
the other rc versions weren't, while testing shows that they will work, they weren't really made to work with php8

and searching your error
Quotemktime(): Epoch doesn't fit in a PHP integer
I found
QuoteCalling mktime () without arguments is deprecated
which is why I assumed you were using php8 as it appears that this has been deprecated in php8
lower you php to 7.4 and the error should go away

shawnb61

I could not get that same error, even in php8, with the current 2.1 code. 

However, distant future dates were definitely an issue.

Logged:  https://github.com/SimpleMachines/SMF2.1/issues/7020
A question worth asking is born in experience & driven by necessity. - Fripp

meccep45

it is strange that only annual holidays cause an error

shawnb61

Were you specifying a year, or "every year"?  What year? (I've tried both with php8 & php7.4, current code...)

Are you using the current GitHub code?  (There are always fixes going in.)

A question worth asking is born in experience & driven by necessity. - Fripp

meccep45


shawnb61

The "Epoch doesn't fit in a PHP integer" issue appears to be an OS build issue. I have found a few articles that say this has to do with using an old version of the libseccomp2 module:
https://community.linkace.org/t/epoch-doesnt-fit-in-a-php-integer-error-on-arm-v7/69
https://github.com/Kovah/LinkAce/issues/255

Please make sure that at least libseccomp2.4.4 is installed.

How to address is OS dependent...
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

I don't think this is at all related to the 2038 issue, as meccep45 never specified a year when entering the holiday date, "every year" was specified.
A question worth asking is born in experience & driven by necessity. - Fripp

meccep45


Advertisement: