ElkArte Community

Project Support => Support => Topic started by: Mrs. Chaos on December 02, 2023, 05:58:35 am

Title: After changing the PHP version, thousands of time error messages are reported
Post by: Mrs. Chaos on December 02, 2023, 05:58:35 am
Hello,

for two days now, thousands of time error messages have been created daily in the forum. I have not changed anything in the forum and the 24-hour format is still set.
However, two days ago I changed the PHP version of all my domains from 8.0 to 8.1 (8.1.22) and therefore I suspect that this has something to do with it.

What do I have to change in the subs.php and logging.php codes to make the errors disappear? Or does something have to be changed somewhere in the admin centre because of PHP 8.1 ?
Attached are screenshots of all error messages.

Kind regards
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: ahrasis on December 02, 2023, 07:02:14 am
What is your forum ElkArte version?
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Mrs. Chaos on December 02, 2023, 09:02:47 am
Oh, I'm still using version 1.1.8 on the forum...
Are there any problems with PHP 8.1 and should I better update to 1.1.9 ?

P.S.:  Is it already certain when version 1.1.10 will be released? :wink:
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Steeley on December 02, 2023, 01:34:50 pm
Depending on how adept you are with php, the suggestions in this may help @Mrs. Chaos ..

https://php.watch/versions/8.1/strftime-gmstrftime-deprecated

...or at least kudos for the heads up  {weak grin}

Then again, rolling back to 8.0 until a patch is in may be the easiest option..

[Update: v1.1.9 supports php 8.x according to the gurus, @Spuds can confirm whether that extends to strftime/gmstrftime going forward to php 9.0 eliminating it completely, if you wish confirmation before choosing that option..]
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Mrs. Chaos on December 02, 2023, 02:24:56 pm
I think it's best for me is if I will roll back to 8.0, because the forum ran without any problems.
And then I will have a look at the other suggestions and possibilities. However, I have just little knowledge of PHP...

Regarding a patch for 8.0:
Will there possibly be one soon? Is one already being worked on?
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Burke Knight on December 02, 2023, 05:22:00 pm
You might be able to fix this via .htaccess, instead of resetting all sites to the earlier php.

Code: [Select]
AddHandler application/x-httpd-alt-php80___lsphp .php

On a side note, I'm running 8.1 and am not getting those time errors.
However, I'm running ElkArte 1.1.9...
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: ahrasis on December 02, 2023, 07:41:47 pm
Only ElkArte version 1.1.9 fixes a lot of php 8.x problems, so unless you are upgrading to that stay with your older php.
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: tino on December 03, 2023, 01:17:46 pm
FYI; I fixed the strftime issue in Elkarte 1.1.9.

It should work for all languages, but I didn’t manage to test every combination.
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Spuds on December 03, 2023, 07:07:32 pm
Quote from: Mrs. Chaos – P.S.:  Is it already certain when version 1.1.10 will be released?
It will be released, but I don't have a current timeline.   I thought 1.1.9 would be the last 1.1 release but there were a few issues raised that I just don't feel right in not fixing.
Quote from: ahrasis – Only ElkArte version 1.1.9 fixes a lot of php 8.x problems, so unless you are upgrading to that stay with your older php.
:point_up_2: Truth !
Title: Re: After changing the PHP version, thousands of time error messages are reported
Post by: Mrs. Chaos on December 04, 2023, 02:22:17 pm

I think I will also switch to 1.1.9 in the next few weeks, but first I want to check whether all installed add-ons will run under this version.