Skip to main content
Topic: Is ElkArte working with PHP 7.0 (Read 2996 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is ElkArte working with PHP 7.0

My hoster plans to get rid of old unsupported PHP versions in November and I can choose between 5.5, 5.6 and 7.0. Actually I am using 5.3.28.

If it's okay with ElkArte I would change to 7.0. But I am an absolute noob with this things. Any hints?

Re: Is ElkArte working with PHP 7.0

Reply #1

I'm not confident enough to say "it works 100%". What I can say is "it should work, it may have issues with sessions.".
If you can easily switch between one and the other, I would suggest to try it out a day or so and if you do not experience any problem, keep using it.
Otherwise go for 5.6.
Bugs creator.
Features destroyer.
Template killer.

Re: Is ElkArte working with PHP 7.0

Reply #2

Thanks!  :)

Re: Is ElkArte working with PHP 7.0

Reply #3

There is a topic around about php 7.0... I used it for a few hours on my forum, but I noticed it was impossible to mention a member so switched back to php 5.6. Don't know if this was solved in the meantime, I did the test a few months ago.
sorry for my bad english

Re: Is ElkArte working with PHP 7.0

Reply #4

Hm, mentions seems to work.

But as I said, I am no expert and I don't know if it really uses PHP 7.0 now. In my config tool I had to switch the domains to PHP 7.0, while the overview of my account still shows 5.3 for the server PHP version. confused

Re: Is ElkArte working with PHP 7.0

Reply #5

What timing for this question!  Just tried out 7.0 and 7.1 last night.  Sessions were completely broken in 7.1.  Dropped back to 7.0.  No session issues so far.  Can concur mentions are broken.  Thanks for mentioning that (no pun intended).

Re: Is ElkArte working with PHP 7.0

Reply #6

Right. Mentioning a username isn't working with 7.0.  :(

Re: Is ElkArte working with PHP 7.0

Reply #7

Woops!  Spoke too soon.  There is a session issue in 7.0 after all.  The error logs are full of:

Type of error: General
Apply Filter: Only show the errors with the same message 2: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct ()

and

Type of error: General
Apply Filter: Only show the errors with the same message 2: Unknown: Session callback expects true/false return value





Last Edit: October 28, 2016, 11:48:56 am by badmonkey

Re: Is ElkArte working with PHP 7.0

Reply #8

Here are the errors related to mentions while using php 7.0:

Type of error: General
8: Array to string conversion
File: /home/xxxx/public_html/sources/controllers/Suggest.controller.php
Line: 80


Type of error: Undefined
 8: Undefined property: Suggest::$Array
File: /home/xxxx/public_html/sources/controllers/Suggest.controller.php
Line: 80
Last Edit: October 28, 2016, 11:12:55 am by badmonkey

Re: Is ElkArte working with PHP 7.0

Reply #9

Here's a fix for mentions in php 7.0:


Edit /sources/controllers/Suggest.controller.php line 80 to:

Code: [Select]
$context['xml_data'] = $suggest->{$currentSearch['function']}();

Re: Is ElkArte working with PHP 7.0

Reply #10

Note:  UNCHECKING "Use database driven sessions" eliminates the errors in the error log. 

Re: Is ElkArte working with PHP 7.0

Reply #11

Quote from: Jorin – and I don't know if it really uses PHP 7.0 now.
You can check that  from the admin panel of elkarte: Admin -> Server Settings -> PHP info (or use this link /index.php?action=admin;area=serversettings;sa=phpinfo )
sorry for my bad english

Re: Is ElkArte working with PHP 7.0

Reply #12

5.5 and 5.6 will be good to go for Elk. 7.0, I suppose will still have to undergo more tests.