Wedge
Public area => The Pub => Topic started by: Jurien on July 16th, 2016, 10:17 AM
-
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)
-
I haven't tried yet.
I don't see any reason it wouldn't work, though.
-
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
-
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
-
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... :-/
-
Oh, I got an error with session_start() on my local php7 site yesterday.
Guess I'll have to look into this, then.
-
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!
-
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)
-
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.
-
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
-
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.
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 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.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).
-
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... -_-
-
No idea about the Problem, but fixing the queries sounds better. Does wedge get incompatible to old mysql versions with those new queries?
-
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.
-
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
sudo apt-get install php7.0-xml followed by a restart service apache
sudo service apache2 restart and after that a reload
sudo systemctl daemon-reload
-
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..!
-
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. ;)
-
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.
-
Not sure it is a PHP 7.2 issue though.
-
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.
-
OK.
With a fresh install I have no issue.
I'll try a more proper migration :whistle:
-
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...
-
Guess I'll have to migrate table after table...
-
Well, well.
Just downgraded to PHP 5.6, it works...
-
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
-
Wedge&PHP 7 it works successfully on my test forum.
-
Works for me too on PHP 7.4
-
Well, upwards PHP compatibility is something I'm keeping an eye on. ;)
Although I'm "stuck" on the version of PHP set up on my server, feel free to contact me if a new version of PHP breaks something, I'll fix it.
-
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
Ben pas de soucis, c'est gentil :)
3 ans après, je me suis repenché sur la question car je souhaite vraiment me débarrasser de cette bécane chez OVH.
J'ai fait cette fois un import table par table et ai pu isoler celle qui pose problème : la table wedge_settings
J'ai beaucoup "joué" avec sans trouver le paramètre qui fait ça, du coup j'ai testé tout simplement en important un dump de tout sauf cette table et tout va bien, je vais donc pouvoir migrer :cool:
Bon me reste un dernier soucis moins gênant mais non lié à PHP 7 : j'ai la plupart des plugins qui ne s'activent pas, quand je clique sur le bouton il ne se passe rien, et ce sur mon vieux serveur PHP 5 comme le nouveau. J'ai du faire une connerie un jour :^^;:
-
How about PHP 8.1?
-
There's a PHP 8? :lol:
Okay sorry, haven't visited this place in a while :ph34r:
-
Not compatible as Wedge uses a function depreciated in PHP 7 and which now does not exist anymore.
-
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.
I finally tried again and found the culprit.
3 entries in the wedge_settings table :
search_index custom
search_custom_index_config a:1:{s:14:"bytes_per_word";i:5;}
I managed to find them by first isolating the problematic table then removing entries per lots until the issue was solved.
As the boss, Nao, has, understandibly and happily much better things to do (I hope my friend :) ), I'm thinking about migrating to another forum solution but did not find any working export tool.
-
, I'm thinking about migrating to another forum solution but did not find any working export tool.
I think the only converter away is to Elkarte. I have absolutely no idea if it still works.