Wedge

Public area => The Pub => Topic started by: Jurien on July 16th, 2016, 10:17 AM

Title: Wedge&PHP 7
Post by: Jurien on July 16th, 2016, 10:17 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:
(http://i.imgur.com/baFRLXp.png)
PHP info Forum Website (Hosted):
(http://i.imgur.com/nE8Ohge.png)
Title: Re: Wedge&PHP 7
Post by: Nao on July 19th, 2016, 10:28 AM
I haven't tried yet.
I don't see any reason it wouldn't work, though.
Title: Re: Wedge&PHP 7
Post by: Jurien 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
Title: Re: Wedge&PHP 7
Post by: emanuele 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
Title: Re: Wedge&PHP 7
Post by: Nao 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... :-/
Title: Re: Wedge&PHP 7
Post by: Nao on August 17th, 2016, 12:11 PM
Oh, I got an error with session_start() on my local php7 site yesterday.
Guess I'll have to look into this, then.
Title: Re: Wedge&PHP 7
Post by: Nao 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!
Title: Re: Wedge&PHP 7
Post by: Jurien 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 (http://php.net/manual/en/migration70.new-features.php)
Title: Re: Wedge&PHP 7
Post by: Nao 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.
Title: Re: Wedge&PHP 7
Post by: Jurien on December 31st, 2016, 09:45 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
(http://i.imgur.com/CLksBGR.png)

Made the decision to install PHP 7 alongside PHP 5,so i have the ability to switch back.
(http://i.imgur.com/gK4A20B.png)
Disabled module PHP 5 and enabled module PHP 7 and restart service apache2
(http://i.imgur.com/6sss3eg.png)
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:
Title: Re: Wedge&PHP 7
Post by: Jurien on January 1st, 2017, 10:06 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)
(http://i.imgur.com/H9qq33V.png)
PHP version Wedge is now 7.0.8 instead of 5.5.37
(http://i.imgur.com/O89zuQP.png)

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
Title: Re: Wedge&PHP 7
Post by: Nao 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).
Title: Re: Wedge&PHP 7
Post by: Nao 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... -_-
Title: Re: Wedge&PHP 7
Post by: CerealGuy 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?
Title: Re: Wedge&PHP 7
Post by: Nao 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.
Title: Re: [XML] Wedge&PHP 7
Post by: Jurien on January 22nd, 2017, 03:49 PM
Had a weird issue with SimpleXML,got a error message when I went to installed plugins,and could not approach plugins anymore.

Be able to solve this issue,by installing php7.0-xml
Code: [Select]
sudo apt-get install php7.0-xml
followed by a restart service apache
Code: [Select]
sudo service apache2 restart
and after that a reload
Code: [Select]
sudo systemctl daemon-reload
Title: Re: Wedge&PHP 7
Post by: Nao on January 26th, 2017, 05:14 PM
Good to know, I suppose!
Personally never got any problems. I don't even remember that Wedge uses SimpleXML... (??)
Not there any many plugins anyway, so I don't exactly spend my time in that section..!
Title: Re: Wedge&PHP 7
Post by: Nao on January 27th, 2017, 12:06 AM
Quote from Nao on January 20th, 2017, 04:26 PM
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.
I forgot about that. Just wanted to reply, 'nope'.
It only works if calling mysqli_query directly. Obviously when you JUST got the database connection, it's unlikely that query() actually has everything it needs to do a proper request. ;)
Title: Re: Wedge&PHP 7
Post by: Kian on November 15th, 2018, 05:58 PM
I have to migrate so I'm trying PHP 7.2 now...

I have an issue.

When I post a message, it works but then I get a white page... don't know why.
Title: Re: Wedge&PHP 7
Post by: Kian on November 16th, 2018, 06:32 PM
Not sure it is a PHP 7.2 issue though.
Title: Re: Wedge&PHP 7
Post by: Kian on November 19th, 2018, 12:08 PM
Is there an exhaustive list of the (for example) Debian packages required for Wedge ?
Can't find any, I guess I might be missing smething for my install.
Title: Re: Wedge&PHP 7
Post by: Kian on November 23rd, 2018, 05:29 PM
OK.

With a fresh install I have no issue.

I'll try a more proper migration :whistle:
Title: Re: Wedge&PHP 7
Post by: Kian on November 26th, 2018, 01:56 PM
Quote from Kian on November 23rd, 2018, 05:29 PM
OK.

With a fresh install I have no issue.

I'll try a more proper migration :whistle:
But then, when I setup the new installation with my produciton database, same issue.

I guess it's located in my DB...
Title: Re: Wedge&PHP 7
Post by: Kian on November 27th, 2018, 05:51 PM
Guess I'll have to migrate table after table...
Title: Re: Wedge&PHP 7
Post by: Kian on November 28th, 2018, 05:00 PM
Well, well.

Just downgraded to PHP 5.6, it works...
Title: Re: Wedge&PHP 7
Post by: Nao on January 29th, 2019, 12:12 PM
Désolé Kianouch, je ne sais pas à quoi correspond ton problème... Je pourrais débugguer sur ton serveur mais je ne passe pas tous les jours ici... Genre tu pourrais m'écrire, aussi. :P