Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 4th 2016, 12:50am
The issue with phpBB 3.1 and PHP 7.0 compatibility has been bothering me for a while now. It honestly appears as though the phpBB dev team is intentionally leaving out the fixes for PHP 7.0 compatibility to force people to migrate (it's NOT an upgrade) to phpBB 3.2.

If this sounds familiar...it is. There were compatibility issues with PHP 5.6 that went unfixed in phpBB 3.0.11 - 3.0.13 even though the fixes had been implemented in the late alpha versions of phpBB 3.1. (It is interesting that the PHP 5.6 compatibility issues were fixed in phpBB 3.0.13-PL1, which was released after 3.1.0. But I digress.)

I wasn't willing to allow this to happen again. I had already fixed the PHP 7.0 compatibility issues in the php-bbdr project, so I decided to migrate those fixes to phpBB 3.1.

php7fix.zip
17.28 KiB  |  Downloaded 777 times

The attached ZIP archive contains a program that will automatically patch your phpBB 3.1.9+ 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, restore the original files, then restore the _bocodes table from the ACP Database Restore page. I would also appreciate your posting a note here describing your problems.

In addition to PHP 7.0 support, these files also add support for emojis if your version of PHP has the mbstring extension installed. This isn't the image-based junk in WordPress and phpBB 3.2, it's real emoji support. And it works without the need to mess with "mb4" collations in your database. That means you can add emojis in posts, forum descriptions, ranks, censored words...whatever. You can add them in forum names and topic titles as well, but support there is limited. If you want full emoji support, please use php-bbdr.
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 4th 2016, 1:18am
IMPORTANT NOTE:

These files are provided AS-IS. I am offering no support for the files.

You are more than welcome to report any problems you encounter, and if it turns out the problem is something in php-bbdr as well, I will fix the problem. Othwewise...you are on your own. Perhaps the phpBB devs will take it upon themselves to incorporate these changes into a future release of phpBB 3.1.
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 10th 2016, 9:31pm
I have been contacted by two people who were unable to install phpBB 3.1.10 on PHP 7.0. It turned out that they had somehow selected the "mysql" database driver, which has been deprecated for years and was finally removed in PHP 7.0. Once they changed their database driver to "mysqli", phpBB 3.1.10 worked perfectly for them on PHP 7.0.

TO ALL PHPBB 3.1.x USERS:

Please check your config.php file. If it contains one of the following two lines:

$dbms = 'mysql';
$dbms = 'phpbb\\db\\driver\\mysql';

Change it to this:

$dbms = 'phpbb\\db\\driver\\mysqli';

Not only will your site run better and slightly faster, it will be compatible when/if you decide to upgrade to PHP 7.0.

To the phpBB devs:

Why are you still allowing the selection of the "mysql" driver? It's time to get rid of it in the installer! And everyone migrating from an older version of phpBB, or converting from a different board solution, should have their config.php file modified to include the "mysqli" DB driver if they previously were using any type of MySQL database.



To the two people who reported this: Thank you for the report, but I would have preferred that you posted the report here instead. Next time, OK? ;)
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 17th 2016, 7:37am
I know it clearly states "compatible with PHP 7.0!" in the title but have these files been tested with php 7.1? Will phpBB 3.1.x using these files work with php 7.1?
φ
Posts: 1
Joined: November 17th 2016, 7:31am
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 17th 2016, 8:55pm
I have no idea whether the files will work with (the yet-to-be-released) PHP 7.1. Through the years I've found that the beta and RC versions of a new minor release aren't particularly stable, so I always wait until the ".0" version is released before doing any serious testing. So...when PHP 7.1.0 is officially released, I'll download and install it on a test server.

TO ALL: if you have installed a beta/RC version of PHP 7.1, I'd appreciate knowing whether these modified files allow phpBB 3.1.9+ to work correctly with this new release.
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted December 12th 2016, 3:23am
I've applies this to 3.1.10 but install still fails at the Requirement page where it says PHP version must be between 5.3 and less than 7.0dev. I've got 7.0 php installed. I have an existing phpBB running fine but I can not install a new one nor upgrade my existing one to the
current code because of this PHP version check.
φ
Posts: 1
Joined: December 12th 2016, 3:19am
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted December 12th 2016, 11:59am
In the php7fix.zip ZIP archive are two files named install_install.php and install_convert.php. Copy those files to the /install directory of your new phpBB 3.1.10 installation. You should now be able to install phpBB 3.1.10.
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
1
#8
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted January 30th 2017, 6:12pm
The php7fix.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 problems due to replacing files from potentially older versions of phpBB.
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted October 28th 2017, 7:30am
Dont work on php 7.1.8 :wave:
φ
Posts: 15
Joined: August 4th 2012, 3:52am
Likes Given: 2
Likes Received: 1
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted October 28th 2017, 12:35pm
I have a test site with PHP 7.1.8 installed, and phpBB 3.1.11 with the patch seems to be running fine on it. Can you be more specific about what doesn't work?
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Make phpBB 3.1.9+ compatible with PHP 7.0!
Posted November 6th 2017, 9:53pm
Yup. :troll:

:)
φ
Posts: 1585
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 356
Post a reply
11 posts

Who is online

Users browsing this forum: No registered users and 1 guest