Freñiçh

  • Webmaster Linux Mint Forum
  • All i want is a couple days off
  • Posts: 129
Wedge&PHP 7
«  »Last edited
Quote
The developers worked very hard to refactor the PHP7 codebase in order to reduce memory consumption and increase performance.
Is Wedge already compatible with PHP7?
My server does supports PHP7 so it is very interesting to see these improvements reflected in Wedge

PHP info on my local server:

PHP info Forum Website (Hosted):
Creativity is inventing, experimenting, growing, taking risks, breaking rules, making mistakes, and having fun.
GitHub Dutch Translation Wedge (Under Construction)

Nao

  • Dadman with a boy
  • Posts: 15,997
Re: Wedge&PHP 7
« Reply #1,  »
I haven't tried yet.
I don't see any reason it wouldn't work, though.

Freñiçh

  • Webmaster Linux Mint Forum
  • All i want is a couple days off
  • Posts: 129
Re: Wedge&PHP 7
« Reply #2,  »
When i try to switch to PHP7,i get this Internal server error
File "wedge-master/index.php" is writeable by group
suPHP 0.7.2

emanuele

  • Posts: 125
Re: Wedge&PHP 7
« Reply #3,  »
One of the common issues I've seen for php7 and "ours" codebases are: sessions.
PHP7 changed some of the expected returns for the custom session handlers, so session handling may break.

Then, if you use dynamic function/method calls, the precedence changed so it *may* be broken (TBH I don't remember if it was 7.0 or 7.1). list has changed (no more empty arguments).
And I think eval throwing an exception is relevant as well (if you silence the error, that is) and there are some odd changes to foreach as well I still have to evaluate.
This are three PRs related to PHP 7 done to Elk:
https://github.com/elkarte/Elkarte/pull/2339
https://github.com/elkarte/Elkarte/pull/2353
https://github.com/elkarte/Elkarte/pull/2600

Nao

  • Dadman with a boy
  • Posts: 15,997
Re: Wedge&PHP 7
« Reply #4,  »
Currently using PHP 7 on my localhost to test my new site...

I'm afraid I'm not seeing any problems with it?
Not even with sessions... :-/
Re: Wedge&PHP 7
« Reply #5,  »Last edited
Oh, I got an error with session_start() on my local php7 site yesterday.
Guess I'll have to look into this, then.
Re: Wedge&PHP 7
« Reply #6,  »
Now that's funny...
The changes in the logs posted above are mostly things that I did to Wedge at least 2 years ago already... Meaning I shouldn't have to do any changes in the first place.
And I'm not able to find any documentation about session changes in PHP 7.

Headaches ahead!

Freñiçh

  • Webmaster Linux Mint Forum
  • All i want is a couple days off
  • Posts: 129
Re: Wedge&PHP 7
« Reply #7,  »
Quote from Nao
And I'm not able to find any documentation about session changes in PHP 7.
Perhaps this will help ?
Session Options

Nao

  • Dadman with a boy
  • Posts: 15,997
Re: Wedge&PHP 7
« Reply #8,  »
Yeah, I don't think there's any difference in there...

I did find documentation about session return values though, something that wasn't on php.net at the time I was working on Wedge (AFAIK). But it only confirmed that Wedge has been doing things properly... So, I don't know.

Freñiçh

  • Webmaster Linux Mint Forum
  • All i want is a couple days off
  • Posts: 129
Re: Wedge&PHP 7
« Reply #9,  »Last edited
Quote from Nao
Currently using PHP 7 on my localhost to test my new site...
On my local test server (RaspberryPi) also using PHP 7


Made the decision to install PHP 7 alongside PHP 5,so i have the ability to switch back.

Disabled module PHP 5 and enabled module PHP 7 and restart service apache2

So on my local server up to now everything works properly.
@Nao I know you almost on your one as developer,but what are the prospects for PHP 7 and Wedge sources

[1]


 1. B.t.w is there a way to donate some money...where's your donation button on the forum :hmm:
Re: Wedge&PHP 7
« Reply #10,  »Last edited
Wedge is doing well on my local server....so why not give it an try on my hosted server.
Set PHP 7 as first using PHP version selector (DirectAdmin)

PHP version Wedge is now 7.0.8 instead of 5.5.37


Conclusion so far no issues.In my opinion Wedge is compatible with PHP7.
(click to show/hide)
For other Forum users who being fobbed off with false promises this is another good reason to make the switch to Wedge in 2017

Nao

  • Dadman with a boy
  • Posts: 15,997
Re: Wedge&PHP 7
« Reply #11,  »
Quote from Freñiçh on December 31st, 2016, 09:45 AM
@Nao I know you almost on your one as developer,but what are the prospects for PHP 7 and Wedge sources
Not surprising, I did fix a few things I noticed were wrong when I switched to PHP 7 a few months ago. ;)
As for promises, I don't know what the competition is up to.
Quote
[1]
 1. B.t.w is there a way to donate some money...where's your donation button on the forum :hmm:
There's a donation system... I think in your profile, you can 'subscribe' to a donation thing.
Alternatively, you can simply send me money ;) (paypal at kyodai dot com).
Re: Wedge&PHP 7
« Reply #12,  »
I'd just like to point out that the unfortunate server move for Wedge.org (in that it was planned long ago but not executed until the last minute and of course shit had to happen...), at least helped point out that Wedge isn't compatible with default installs of MySQL 5.7 and above, which set SQL mode to 'strict' by default.

I'm torn between fixing the faulty queries (which is looking like a headache to me) and just disabling strict mode for the current connection...
Only, it doesn't work for me. -_-

wesql::get('SELECT @@sql_mode') ==> returns NOTHING in Wedge... returns an actual string in phpMyAdmin. WUT?!
wesql::query('SET session sql_mode = "TRADITIONAL"', array('security_override' => true)); ==> does nothing. Strict mode still at work.

Anyone inspired by this..? Maybe it's a server problem.
The sad thing is, I just spent 2 hours on this crap, and I could have just used the time to fix the queries, because I know I'll do it eventually... -_-

CerealGuy

  • Posts: 336
Re: Wedge&PHP 7
« Reply #13,  »
No idea about the Problem, but fixing the queries sounds better. Does wedge get incompatible to old mysql versions with those new queries?

Nao

  • Dadman with a boy
  • Posts: 15,997
Re: Wedge&PHP 7
« Reply #14,  »
Well I've written some fixer code, which took about an hour, and then I looked into the bad queries and only found a couple, lol...
It's probably best to just fix them, yeah.
Only problem is that it'll make them slower!
It's really mostly in the media area (viewing an item), and the thought list. Two features that I wrote, lol :P
Updated queries: either I add an entry to GROUP BY (slower), or surround the SELECT version with ANY_VALUE() (slow, too, and not compatible with MySQL 5.6 and less), or surround with MIN(), which has unpredictable results and is even slower, but well, at least it'd work.