Wedge&PHP 7
[Suggestion] HTML & PHP Blocks  »

Jurien

  • All i want is a couple days off
  • Posts: 132
Wedge&PHP 7
« on July 16th, 2016, 10:17 AM »Last edited on July 16th, 2016, 11:07 AM
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):

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Wedge&PHP 7
« Reply #1, on July 19th, 2016, 10:28 AM »
I haven't tried yet.
I don't see any reason it wouldn't work, though.

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Wedge&PHP 7
« Reply #2, on July 19th, 2016, 06:05 PM »
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, on July 22nd, 2016, 07:51 PM »
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: 16,079
Re: Wedge&PHP 7
« Reply #4, on August 14th, 2016, 02:05 AM »
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, on August 17th, 2016, 12:11 PM »Last edited on August 19th, 2016, 12:48 AM
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, on August 17th, 2016, 05:49 PM »
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!

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Wedge&PHP 7
« Reply #7, on August 22nd, 2016, 12:06 PM »
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: 16,079
Re: Wedge&PHP 7
« Reply #8, on August 26th, 2016, 12:21 AM »
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.

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Wedge&PHP 7
« Reply #9, on December 31st, 2016, 09:45 AM »Last edited on December 31st, 2016, 10:52 AM
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, on January 1st, 2017, 10:06 AM »Last edited on January 1st, 2017, 10:45 AM
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: 16,079
Re: Wedge&PHP 7
« Reply #11, on January 18th, 2017, 01:32 AM »
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, on January 20th, 2017, 04:26 PM »
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: 343
Re: Wedge&PHP 7
« Reply #13, on January 20th, 2017, 08:22 PM »
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: 16,079
Re: Wedge&PHP 7
« Reply #14, on January 21st, 2017, 12:58 AM »
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.

[Suggestion] HTML & PHP Blocks  »