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.

phpBB2.0.23 for PHP7 Download

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
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Wed Jan 29, 2020 4:41 pm 
Post subject: phpBB2.0.23 for PHP7 Download

I upgraded phpBB 2.0.23 to support PHP7.

If you start with a fresh install you need to apply these changes to add compatibility for PHP 5.4 first:
http://phpbb2refugees.com/viewtopic.php?p=7416#7416

And these unofficial 2.0.24 update to fix a security hole:
http://phpbb2refugees.com/viewtopic.php?p=7729#7729

After that you can apply the PHP7 changes which adds new features to the make_clickable() function, too:
- If a link is at the end of a sentence the punctuation mark is not linked anymore
- ftp links are not linked anymore (because they aren't really used anymore and disabled in Google Chrome since 2019)
- email addresses are a little bit scrambled for logged out users to protect them against crawlers
- external links get target=_blank
- a list of domains receive automatically rel=nofollow like wikipedia.org as they do not link forums as well
- youtube links are converted automatically to embed youtube players
- very long urls are displayed shortened, but copy & paste is still possible (I'm proud of this invention). To enable this feature you need to add this style to your CSS file:
Code:
.shrtlnk { border-bottom:1px dotted #f00;padding:0 8px;margin:0 4px;position:relative;bottom:2px;font-size:0px; }


Feel free to remove the code lines of new features if you don't like them.

In addition through bbencode_first_pass():
- Posted image links are automatically surrounded by IMG-BBCode tags

To upgrade your files I suggest to use a file content comparison software Like Beyond Compare, Meld or WinMerge. I'm not familiar with automatically creating a mod installation file that is compatible with Easy Mod. Maybe someone can explain that to me.

Do not forget to replace this in config.php to enable the new PHP7 comaptible database class:
Code:
$dbms = 'mysql';


against:
Code:
$dbms = 'mysqli';



Update 03/2020
Because of minor bugs the download package has been updated.



phpbb 2.0.23.php7.v2.zip
 Description:

Download
 Filename:  phpbb 2.0.23.php7.v2.zip
 Filesize:  101.64 KB
 Downloaded:  205 Time(s)

Back to top
kinerity
Board Member



Joined: 24 Jan 2020

Posts: 4



PostPosted: Wed Jan 29, 2020 6:48 pm 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Does it require phpBB to be installed? I tried uploading phpBB 2 and these files and I'm getting either 502 Bad Gateway errors or 500 errors. Running 7.4.2.
Back to top
kinerity
Board Member



Joined: 24 Jan 2020

Posts: 4



PostPosted: Wed Jan 29, 2020 7:01 pm 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Also, the DB attached to my PHP config is MariaDB (MySQL not available).

Quote:
The PHP configuration on your server doesn't support the database type that you chose
Back to top
jtrumpfheller
Board Member



Joined: 05 Aug 2019

Posts: 15
Location: Berlin


flag
PostPosted: Wed Jan 29, 2020 7:02 pm 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Hy mgutt,

just to clarify: Do you mean phpBB2.0.23 (Subject title) or 2.0.32 (body-text)??? I am running phpBB2.0.23 with this Solaris template. Don't know if there is a higher version of phpBB2.

_________________
any % of U is as good as the whole pie - George Clinton
https://www.spearhead-home.com

Joerg
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Wed Jan 29, 2020 8:25 pm 
Post subject: Re: phpBB2.0.23 for PHP7 Download

@jtrumpfheller

Sorry. This was a typo. 23 is correct. This was the last official version.
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Wed Jan 29, 2020 10:27 pm 
Post subject: Re: phpBB2.0.23 for PHP7 Download

kinerity wrote:
Does it require phpBB to be installed? I tried uploading phpBB 2 and these files and I'm getting either 502 Bad Gateway errors or 500 errors. Running 7.4.2.


Did you try to do a fresh install of phpBB 2.0.23 only with my changes related to PHP7? This can't work as since PHP 5.4.0 there are multiple other changes needed as well. For example all htmlspecialchars() occurrences need to be updated. If anyone is interested in a phpbb 2.0.23 version including all changes that are necessary for PHP 5.4 and PHP 7 I can try to provide that, too. But this costs a little bit more time and will contain much more file changes. I thought anyone else provided that before. Isn't it part of the unofficial phpBB 2.0.24 changes?
Back to top
marz
Board Member



Joined: 06 Mar 2020

Posts: 12



PostPosted: Fri Mar 06, 2020 7:52 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Dear mgutt

Thank you so much for your post. I am still running a phpbb2.0.24 (made the MOD-update yesterday from 2.0.23) board and I am getting in trouble with the php version. It's actually on PHP 5.6 but this version will die at the end of the year and when I switch to PHP 7, I'll get an error.

I have replaced all the files (login.php, privmsg.php etc.) from your zip file but it's still not working. Am I doing something wrong? Sadly, I am not really a pro...
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Fri Mar 06, 2020 9:13 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Yes, I found some more files that needed updates. At first you should enable error reporting by adding this to your common.php:
Code:
error_reporting(-1);
ini_set('display_errors', 1);


If you post the errors I can help you finding the problem. Maybe I find the time to install a vanilla phpbb and update all relevant files again, but I can't promise.
Back to top
marz
Board Member



Joined: 06 Mar 2020

Posts: 12



PostPosted: Fri Mar 06, 2020 9:19 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

I will do that, thanks. But just for my understanding: Did I go the right way with replacing those files?
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Fri Mar 06, 2020 9:25 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Yes, this was absolutely correct. But I found some more code that needed to be updated so the ZIP files does not include all the files. As far as I remember it was:
Code:
mysql_real_espace_string(


that needed to be replace against:
Code:
mysqli_real_escape_string($db->db_connect_id,


But I think it was related to some mods. Hmm... not sure anymore. But as I said. Enable error reporting and we will see.
Back to top
marz
Board Member



Joined: 06 Mar 2020

Posts: 12



PostPosted: Fri Mar 06, 2020 9:55 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

I have added the code and set the PHP version back to 7.1. I have this message:

Quote:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/db/mysql.php:54 Stack trace: #0 /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/includes/db.php(60): EDIT #1 /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/common.php(193): include('/home/httpd/vho...') #2 /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/index.php(26): include('/home/httpd/vho...') #3 {main} thrown in /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/db/mysql.php on line 54
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Fri Mar 06, 2020 10:06 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

You need to set "mysqli" in config.php:
Code:
$dbms = 'mysqli';


At the moment you are using the old database class "mysql" that is not compatible with PHP7.

P.S. please edit your forum post and remove the line "sql_db('localhost....." as it contains your database username.
Back to top
marz
Board Member



Joined: 06 Mar 2020

Posts: 12



PostPosted: Fri Mar 06, 2020 10:21 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Thanks for the hint, I've changed it. I have also edited the code in my config.php and have this error now:

Quote:
Fatal error: Uncaught Error: Class 'sql_db' not found in /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/includes/db.php:60 Stack trace: #0 /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/common.php(193): include() #1 /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/index.php(26): include('/home/httpd/vho...') #2 {main} thrown in /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/includes/db.php on line 60
Back to top
mgutt
Board Member



Joined: 27 Jan 2020

Posts: 20



PostPosted: Fri Mar 06, 2020 10:58 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Oh, I missed one changed file in my download package. Attached you find the updated includes/db.php

I will update the main package after we surely solved all bugs.



db.zip
 Description:

Download
 Filename:  db.zip
 Filesize:  730 Bytes
 Downloaded:  182 Time(s)

Back to top
marz
Board Member



Joined: 06 Mar 2020

Posts: 12



PostPosted: Fri Mar 06, 2020 11:35 am 
Post subject: Re: phpBB2.0.23 for PHP7 Download

Hey, the board seems to work now, that's awesome. Thank you so much. I am checking all the functions now.

- On the Administration site, there's an error in the menu-frame:

Quote:
Parse error: syntax error, unexpected '=' in /home/httpd/vhosts/sehnsucht.ch/httpdocs/offtopic/admin/admin_db_utilities.php on line 511


I am running the board on PHP 7.1 now. Is it also possible to change to 7.3 or 7.4?
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.0302 seconds using 17 queries. (SQL 0.0023 Parse 0.0025 Other 0.0255)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo