2
#1
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted November 25th 2016, 11:30pm
Three weeks ago I provided a way to make phpBB 3.1.9+ compatible with PHP 7.0, and to add support for emojis. Now it's time to do the same for phpBB 3.0.12+. :D

The attached ZIP archive contains a program that will automatically patch your phpBB 3.0.12+ installation. It has some requirements to use, so please follow the instructions in the README.TXT file in the archive.

If you have problems which cannot be resolved, post a note here describing your problems.

Please be aware that certain MODs and hacks contain code that is incompatible with PHP 7.0. This is particularly true with MODs/hacks related to BBcodes. If you have installed a MOD/hack that is incompatible with PHP 7.0, you must fix its code before your phpBB installation will work with PHP 7.0. Please contact the author of the MOD/hack; perhaps they have already fixed their code. If not, post a note here and I'll do my best to assist.

php7_30fix.zip
24.34 KiB  |  Downloaded 232 times

EDIT: File now contains the fixes described in post #5.
φ
Posts: 1553
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 354
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted December 4th 2016, 2:21am
Thank you for this. My site is currently using phpBB 3.0.12 w/ the latest (and abandoned) version of WP-United and WordPress 4.6.1. I just migrated my site from shared hosting to my own dedicated box running an Ubuntu 16.04 LAMP stack (mysql 5.7 and php 7.0.9). Everything was running relatively smooth except that I was getting 'Your message contains too few characters' errors on trying to make or edit any forum post, regardless of bbcodes being used or not. You file pack did the trick - had to not use the modified auth.php as it was messing with WP-United integration, but otherwise so far so good. Giving BridgeDD a serious look, just want to get the migration kinks knocked out first.

Again, thanks!
φ
Posts: 1
Joined: December 4th 2016, 12:58am
Likes Given: 1
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted December 4th 2016, 5:57pm
I'm glad it worked out for you!

FYI, it is possible to import your WP-United integration data into BridgeDD...ask me about it on the BridgeDD support board.
φ
Posts: 1553
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 354
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted January 30th 2017, 6:13pm
The php7_30fix.zip file has been updated. Replacement files have been removed, and an auto-patcher has been added in their place. This makes the patch process easier and eliminates conflicts that can be caused by replacing files in phpBB 3.0.x.
φ
Posts: 1553
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 354
1
#5
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted February 8th 2017, 10:10pm
I was alerted to a problem in the patch file which caused certain MODs to display blank pages. The problem has been fixed. I have also updated the php7_patch.php script. If you load the script with the "revert" option, as follows:

[phpBB domain]/php7_patch.php?revert=true

the script will revert the changes originally made to your files to make them compatible with PHP 7.0. This is useful if you already patched your baord and would like to run the updated patches. You could upload the php7_patch.php file to your phpBB installation and run it with the revert option. You could then upload the new php7.diff file and run php7_patch.php again to add the revised patches.

These updates are in the php7_30fix.zip file in the first post of this topic.
φ
Posts: 1553
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 354
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted March 19th 2017, 10:50pm
If it helps anyone, I have PHP 7.1 installed, and there's another incompatibility. In includes/functions_messenger.php, line 212:

$this->tpl_msg[$template_lang . $template_file] = new template();

... throws an "Illegal string offset" PHP error to the user, when they try and post a message that any other user has subscribed to. In other words, when the board tries to send a topic-reply notification email, this error triggers.

While I can't admit to understanding exactly what this section of code is doing -- it looks like some really screwy programming techniques to my amateur eyes -- the following line, added just above line 212, will fix it:

$this->tpl_msg = array();

I believe the error is related to this change in PHP 7.1:

Applying the empty index operator to a string (e.g. $str[] = $x) throws a fatal error instead of converting silently to array.


However, line 212 is not attempting to assign an empty index operator -- the index operator is populated (by "ennotify", which makes no earthly sense), so the string should be applied to an array. But whatever.

Hope this helps someone.

Foul
φ
Posts: 2
Joined: March 19th 2017, 10:39pm
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted March 20th 2017, 10:17am
Thank you for the report!

FYI, this is a bug in PHP 7.1 (one of many, BTW), and I'm not sure I want to "fix" something that isn't broken. If you have the ability to revert to the PHP 7.0.x line, you should do so.
φ
Posts: 1553
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 354
Make phpBB 3.0.12+ compatible with PHP 7.0!
Posted March 21st 2017, 10:35pm
I may do just that!

Foul
φ
Posts: 2
Joined: March 19th 2017, 10:39pm

Who is online

Users browsing this forum: No registered users and 1 guest