Author |
Message |
b0blee Board Member

Joined: 11 Jun 2012
        Posts: 31 Location: Cloverdale, northern California

|
Posted: Wed Feb 06, 2019 5:12 pm Post subject: Upgrade for PHP 7.x |
|
|
phpBB2 works with PHP 5.6, but I'd like to run it under PHP 7.x. The main problem is that the MySQL API from PHP 5 is no longer available in PHP 7.
What is the best way to convert phpBB2 to run under PHP 7? _________________ -πππ- at The Steel Guitar Forum |
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 215

|
Posted: Wed Feb 06, 2019 8:28 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
Hi,
This is the class I put up together for my own use: mysqli.php.
You can also try Premod-Shadow's file, it supposedly runs mysqli as well -- Mine is based on it!
I've gotten quite a few premodded boards to run on PHP7+ so feel free to ask if you have other issues. _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
 |
lumpy burgertushie Board Member

Joined: 19 Nov 2008
            Posts: 255

|
Posted: Thu Feb 07, 2019 7:58 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
b0blee wrote: | phpBB2 works with PHP 5.6, but I'd like to run it under PHP 7.x. The main problem is that the MySQL API from PHP 5 is no longer available in PHP 7.
What is the best way to convert phpBB2 to run under PHP 7? |
doing a search here comes up with quite a few issues with getting phpbb2 to even run under php5.6
like anything, getting it to run on php7 is possible but I wonder if it is worth the effort if you are not a php programmer.
robert |
|
Back to top |
|
 |
b0blee Board Member

Joined: 11 Jun 2012
        Posts: 31 Location: Cloverdale, northern California

|
Posted: Fri Feb 08, 2019 4:35 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
Vendethiel wrote: | Hi,
This is the class I put up together for my own use: mysqli.php.
You can also try Premod-Shadow's file, it supposedly runs mysqli as well -- Mine is based on it!
I've gotten quite a few premodded boards to run on PHP7+ so feel free to ask if you have other issues. |
That's very impressive. how would I go about integrating it into phpBB2? _________________ -πππ- at The Steel Guitar Forum |
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 215

|
Posted: Fri Feb 08, 2019 5:15 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
It should be *almost* a drop-in replacement of your mysql.php, the SQL_LAYER needs fixed, and the cache part needs removed if your current mysql class doesnβt implement it. _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
 |
dogs and things Board Member

Joined: 18 Nov 2008
            Posts: 624 Location: Spain

|
Posted: Wed Feb 13, 2019 10:57 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
Hi,
I get a 404 on github? _________________ phpBB2 will never die, I hope! |
|
Back to top |
|
 |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 163 Location: Germany

|
|
Back to top |
|
 |
dogs and things Board Member

Joined: 18 Nov 2008
            Posts: 624 Location: Spain

|
Posted: Thu Feb 14, 2019 7:29 am Post subject: Re: Upgrade for PHP 7.x |
|
|
Danke schΓΆn!  _________________ phpBB2 will never die, I hope! |
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 215

|
Posted: Thu Feb 14, 2019 7:56 am Post subject: Re: Upgrade for PHP 7.x |
|
|
Oops, I moved that file a week ago, forgot about this. _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
 |
b0blee Board Member

Joined: 11 Jun 2012
        Posts: 31 Location: Cloverdale, northern California

|
Posted: Fri Feb 15, 2019 4:17 am Post subject: Re: Upgrade for PHP 7.x |
|
|
So, do I understand this correctly?
1) add mysqli.php to the system
2) point to it in includes/db.php
Is that all there is to it? _________________ -πππ- at The Steel Guitar Forum |
|
Back to top |
|
 |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 163 Location: Germany

|
Posted: Fri Feb 15, 2019 5:53 am Post subject: Re: Upgrade for PHP 7.x |
|
|
b0blee wrote: | So, do I understand this correctly?
1) add mysqli.php to the system
2) point to it in includes/db.php
Is that all there is to it? |
If you don't use IntegraMOD, then you place the file in phpbb_root_path/db/, and switch to it in the config.php. |
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 215

|
Posted: Fri Feb 15, 2019 2:44 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
I think it's just a lot easier to replace your mysql file with my mysqli file, and change the constant SQL_LAYER to mysql, just to support old phpBB code that switch()es on SQL_LAYER.
Thankfully a lot of code checks that it "starts with mysql" (to support mysql and mysql4) and the rest mostly considers mysql the default, so it should already work with mysqli. _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
 |
b0blee Board Member

Joined: 11 Jun 2012
        Posts: 31 Location: Cloverdale, northern California

|
Posted: Sun Feb 17, 2019 3:08 am Post subject: Re: Upgrade for PHP 7.x |
|
|
Vendethiel wrote: | I think it's just a lot easier to replace your mysql file with my mysqli file, and change the constant SQL_LAYER to mysql, just to support old phpBB code that switch()es on SQL_LAYER. |
Are you saying that you rename mysqli.php to mysql.php, and just change the one line that defines the constant in it? _________________ -πππ- at The Steel Guitar Forum |
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 215

|
Posted: Sun Feb 17, 2019 10:06 pm Post subject: Re: Upgrade for PHP 7.x |
|
|
I don't want to mislead you, so I'll be trying this procedure on another one of my phpBB2 boards and get back to you with a working procedure.
I'll probably skip the install section though, is that OK? _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
 |
b0blee Board Member

Joined: 11 Jun 2012
        Posts: 31 Location: Cloverdale, northern California

|
Posted: Mon Feb 18, 2019 2:40 am Post subject: Re: Upgrade for PHP 7.x |
|
|
Vendethiel wrote: | I don't want to mislead you, so I'll be trying this procedure on another one of my phpBB2 boards and get back to you with a working procedure.
I'll probably skip the install section though, is that OK? |
Great! Thanks. _________________ -πππ- at The Steel Guitar Forum |
|
Back to top |
|
 |
|