Page 1 of 2

PHP 7.0 - 7.2

Posted: Sun Jul 05, 2020 8:07 am
by kestasjk
Hi all,

FYI in preparation for an upcoming server move we have migrated to PHP 7.2. Unfortunately it has a breaking change which has come up in a couple of places in webDip code. The error will look like this:
PHP 7.2 - Warning: count(): Parameter must be an array or an object that implements Countable

Unfortunately you use count() everywhere, and in PHP it's hard to tell whether a variable going into count() is an array just by looking at the code, meaning it's something we just have to fix as it comes up. So far it only seems to have affected map rendering and that is fixed, but we will keep an eye on the error log and if you notice any new bugs please say so here.

Good news is that this means the server move will be much smoother, since we'll be moving to the same environment we have here.

Re: PHP 7.0 - 7.2

Posted: Sun Jul 05, 2020 8:42 am
by kestasjk
So far there has been a bug in the map, the pre-game adjudicator, and the registration form. These should be resolved but clearly we'll need to keep a sharp eye on the error logs for a while.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 2:08 am
by kestasjk
Hmm. I was expecting more errors here and in the error logs, all I have since yesterday are a couple of deadlock errors which always happened. Need to look into these issues that are occurring further. Can no-one post or something?

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 2:47 am
by Kestasjk_test
Okay I can see that I didn’t properly port over the authentication module for the forum, which is weird because I was able to authenticate anyway.. Must have been a cached cookie or some such, no wonder there were no messages here!

Can anyone please let me know if there were any other issues? I will add two days to all games and resume processing, because there’s nothing in the error logs so I think this was just a configuration mistake.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 3:01 am
by Kestasjk_test
I’m hearing that there are still issues, but I’m playing with bots, going back and forth from the forum, sending messages creating games etc. If you’re getting any errors please e-mail kestas.j.k@gmail.com

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 4:10 am
by Squigs44
Alright, looks like we can post in the forum once again!

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 4:24 am
by jmo1121109
@kestas the authentication for the first person to make the board is different than everyone elses. The owner of the italian site ran into that too. Have to use a different account to test.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 4:29 am
by jmo1121109
Alright for known issues, the +1 add on page on profiles is messed up size wise, the deeper you go into forum links the more messed up they get but that somewhat existed already. Some games will have been drawn with bad maps but the new turns will be fine. Anything else please post here about.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 9:10 am
by cdngooner
All games were apparently automatically paused. Can they now be automatically unpaused? At least non-live games.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 10:03 am
by delarosa
Fall of American Empire map doesn't display properly. missing all SCs

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 10:35 am
by Claesar
cdngooner wrote:
Mon Jul 06, 2020 9:10 am
All games were apparently automatically paused. Can they now be automatically unpaused? At least non-live games.
No, this is only possible manually and it's way too much for us. Please unpause your own games as much as humanly possible.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 11:46 am
by kestasjk
Claesar is there any way I can automatically unpause the games for you? Is it something that you can give a rule for which games need to be unpaused, and if so I can run a query against the database and the database backup and unpause those games.
e.g. "Any games that weren't paused before the update and weren't paused by a moderator or paused by a vote should be unpaused"?

(Apologies I didn't realize there was a certain technique for adding time to games without causing pauses.)

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 11:47 am
by kestasjk
Fall of American Empire map missing SCs ?!? Can you give me a game ID, I don't think the software even draws the SCs to the map, that's caked into the board image I thought

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 11:47 am
by kestasjk
jmo1121109 wrote:
Mon Jul 06, 2020 4:24 am
@kestas the authentication for the first person to make the board is different than everyone elses. The owner of the italian site ran into that too. Have to use a different account to test.
Dang. Thanks for cleaning up after my mistake

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 11:49 am
by kestasjk
The good news is after a day of games getting processed there were no other PHP 7.2 issues; I think we're 7.2 compatible now.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 11:57 am
by Chumbles
At least in this game: http://www.webdiplomacy.net/board.php?g ... tboxanchor
The small AncMed map is using the bigmap font, making the text for each area overlap in a lot of places so that the text is unreadable at the resolution I have to use (sight problems).

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 12:04 pm
by kestasjk
Hi Chumbles,
I've fixed the territories on that game, that was a known issue that crept into the cache so still was showing after it was fixed. I'll clear out the map cache which might cause some temporary performance problems but will at least get rid of any of those bad maps.

THanks,
Kestas

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 12:16 pm
by tsvi14
There's still problems in the games I'm in with the territory names being super bold and therefore the map being extremely hard to see.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 12:19 pm
by kestasjk
Just cleaning the cache out now tsvi14, I'll send another post when it's done then it should all be cleared up.

Re: PHP 7.0 - 7.2

Posted: Mon Jul 06, 2020 3:41 pm
by Chumbles
Thanks Kestas, you're a star!