Skip to main content
Topic: Php7.4 compatibality (Read 1608 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Php7.4 compatibality

@emanuele mentioned that current EA is not fully php7.4 compatible and I never fully tested this though I did try running it on php7.4.

Are there a lot of things to do to make it fully compatible to php7.4 or should we just stick to using EA with php7.2?

EOL of php7.2 at 30/11/2020 is mentioned here:
https://www.php.net/supported-versions.php

Re: Php7.4 compatibality

Reply #1
I am using 7.3 and it works, I do have some errors on elkarte log, some related to mods and probably some related to elkarte.

I can use my 2 forums and report all the errors I got, if there are plans to make it compatible with 7.4.
sorry for my bad english

Re: Php7.4 compatibality

Reply #2
I think that would be a good thing to do. :)

Everyone is obviously going to have to move to at least PHP 7.3 soon, so if there are some errors which are easy to patch it'd be good to have a list. If it can be made to work without errors on 7.3 pretty quickly, that will give another year of leeway before 7.3 hits EOL.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Php7.4 compatibality

Reply #3
Just cleared my log, but in the next days I will report them. 
sorry for my bad english

Re: Php7.4 compatibality

Reply #4
7.4 if I remember correctly requires few bits.
I think the board index itself is broken in 7.4 (at least for 1.1, 2.0 should have been fixed a while ago), but it should be a minor change to fix.
Bugs creator.
Features destroyer.
Template killer.

Re: Php7.4 compatibality

Reply #5
I think the sooner the fixes are released, the better. Today is the last day of php7.2 security support anyway.

I believe php8.0 has also been released so EA compatible to it is also another plus.

Re: Php7.4 compatibality

Reply #6
ehh... yeah...
I'm wasting so much time watching youtube I wouldn't have never imagined a year ago. Really.
I have to find a way to shut it down for good... ;^_^
Bugs creator.
Features destroyer.
Template killer.

Re: Php7.4 compatibality

Reply #7
I'm glad I'm not the only one wasting my time on youtube videos LOL ... amazing how that can suck you in
Be safe, Be kind, Happy Programing

Re: Php7.4 compatibality

Reply #8
I've started to work on the 7.4 issues  ... fixed a few files, mostly importantly the bbc parser.

Anyway if anyone is using 7.4 and can point me at pages / actions that have errors, then do so here, Thanks!
Be safe, Be kind, Happy Programing

Re: Php7.4 compatibality

Reply #9
Just quicly switched to PHP 7.4 and I get this in elkarte error log at any page refresh

Guest
Tipo di errore: Generale
Notice: Trying to access array offset on value of type null
File: /sources/BrowserDetector.class.php
Line: 249

247:if (!isset($this->_browsers['possibly_robot']))
248:{
249:if ($user_info['possibly_robot']) {
250:// This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up.
251:$this->_browsers['possibly_robot'] = !empty($user_info['possibly_robot']);
sorry for my bad english

Re: Php7.4 compatibality

Reply #10
I think that may be a small bug from SP as I can't reproduce it on my local ... but I added a fix in Elkarte for those lazy addon writers

Just change that 249 line to be
Code: [Select]
if (isset($user_info['possibly_robot'])) {
Be safe, Be kind, Happy Programing

Re: Php7.4 compatibality

Reply #11
This solved that annoying error, thanks Spuds

Now:
Tipo di errore: Generale
Notice: Trying to access array offset on value of type bool
File: /sources/subs/Drafts.subs.php
Line: 458

Code: [Select]
	if ($draft_info['is_usersaved'] == 1)
sorry for my bad english


Re: Php7.4 compatibality

Reply #13
Seems to be solved, that error disapperead ;)


I am using PHP 7.4 on my small forum hyundairacing.it and I am testing first the most used and important tasks, like registration, posting, search, etc...
I just did a new registration, and I got this on elk log:

    Guest
    Tipo di errore: Generale
    Notice: Trying to access array offset on value of type bool
    /index.php?action=auth;sa=check;member=1025
    File: /sources/Load.php
    Line : 294
293:// If it was *at least* five hours ago...
294:if ($visitOpt['poster_time'] < time() - 5 * 3600)
295:{
The registration worked fine

@Spuds‍ I know it's not your add-on, and I doubt Bugo will answer, but do you have any idea on this error?
https://github.com/dragomano/Optimus/issues/32
sorry for my bad english

Re: Php7.4 compatibality

Reply #14
For that one, changing line 294 to be:
Code: [Select]
			if ($visitOpt === false || $visitOpt['poster_time'] < time() - 5 * 3600)
should resolve that.

I'll try to take a look at Bugo's code

ETA: that Optimus error should be fixed by chanign line 290 to:
Code: [Select]
$context['insert_after_template'] .= implode(',', $list_item);

Be safe, Be kind, Happy Programing