phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Upgrade for PHP 7.x

Goto page 1, 2  Next
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
b0blee
Board Member



Joined: 11 Jun 2012

Posts: 10
Location: Cloverdale, northern California



PostPosted: 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: 119



PostPosted: 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: 229


flag
PostPosted: 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: 10
Location: Cloverdale, northern California



PostPosted: 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: 119



PostPosted: 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: 623
Location: Spain


flag
PostPosted: 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: 112
Location: Germany


flag
PostPosted: Thu Feb 14, 2019 6:30 am 
Post subject: Re: Upgrade for PHP 7.x

dogs and things wrote:
Hi,

I get a 404 on github?

It's actually https://github.com/IntegraMOD/IntegraMOD151/blob/master/IM150/includes/db/mysqli.php (the includes/ was missing in the url).
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 623
Location: Spain


flag
PostPosted: Thu Feb 14, 2019 7:29 am 
Post subject: Re: Upgrade for PHP 7.x

Danke schΓΆn! icon_biggrin.gif
_________________
phpBB2 will never die, I hope!
Back to top
Vendethiel
Board Member



Joined: 26 Oct 2014

Posts: 119



PostPosted: 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: 10
Location: Cloverdale, northern California



PostPosted: 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: 112
Location: Germany


flag
PostPosted: 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: 119



PostPosted: 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: 10
Location: Cloverdale, northern California



PostPosted: 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: 119



PostPosted: 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: 10
Location: Cloverdale, northern California



PostPosted: 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
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT
Goto page 1, 2  Next
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0303 seconds using 15 queries. (SQL 0.0034 Parse 0.0010 Other 0.0259)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo