Author |
Message |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 165 Location: Germany

|
Posted: Thu Oct 22, 2020 9:04 am Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Doelli wrote: | After replacing the functions.php from Git Hub, i get this errors:
Quote: |
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Template has a deprecated constructor in /home/u333455499/public_html/forum7/includes/template.php on line 30
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; sql_db has a deprecated constructor in /home/u333455499/public_html/forum7/db/mysqli.php on line 27
Fatal error: Uncaught Error: Call to undefined function realdate() in /home/u333455499/public_html/forum7/index.php:278 Stack trace: #0 {main} thrown in /home/u333455499/public_html/forum7/index.php on line 278 |
Any Idea? |
For the constructor warnings, in includes/template.php replace function Template with function __construct:
Code: | function Template($root = ".") |
replaced with:
Code: | function __construct($root = ".") |
And in db/mysqli.php
Code: | function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) |
with:
Code: | function __construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) |
The error with realdate() comes from a MOD, since it is not part of phpBB. Since you replaced the functions.php, it doesn't work as expected. I think the MOD in question is "Today At, Yesterday At".
The files on Github are ONLY for unmodded boards.
|
|
Back to top |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Thu Oct 22, 2020 12:02 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Hi StarWolf3000,
thank you very much for your support!
I switched back to my personal function.php and did the changes in in includes/template.php and db/mysqli.php as you described.
If i now try to open the Forum, this error messages appears:
Quote: | Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/u333455499/public_html/forum7/common.php on line 110
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -2 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -2 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -1 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -1 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -4 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -4 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -3 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -3 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -6 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -6 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Warning: Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP) in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Warning: A non-numeric value encountered in /home/u333455499/public_html/forum7/includes/functions.php on line 1066
Notice: Undefined offset: -6 in /home/u333455499/public_html/forum7/includes/functions.php on line 1096
Notice: Undefined offset: -6 in /home/u333455499/public_html/forum7/includes/functions.php on line 1108
Notice: Undefined variable: birthday_today_list in /home/u333455499/public_html/forum7/index.php on line 318
Notice: Undefined variable: birthday_week_list in /home/u333455499/public_html/forum7/index.php on line 319
Notice: Undefined variable: users_lasthour in /home/u333455499/public_html/forum7/index.php on line 335
Notice: Undefined variable: users_today_list in /home/u333455499/public_html/forum7/index.php on line 362
Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 373
Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 374
Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 377
Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 378
Warning: Cannot modify header information - headers already sent by (output started at /home/u333455499/public_html/forum7/includes/functions.php:1066) in /home/u333455499/public_html/forum7/includes/page_header.php on line 67
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/u333455499/public_html/forum7/chatbox_front.php:28 Stack trace: #0 /home/u333455499/public_html/forum7/includes/page_header.php(465): require_once() #1 /home/u333455499/public_html/forum7/index.php(387): include('/home/u33345549...') #2 {main} thrown in /home/u333455499/public_html/forum7/chatbox_front.php on line 28 |
In the functions.php is a MOD included which is called Birthday MOD.
I assume that is the reason for the error in Line 1066:
Quote: | $year= -(date%1461); |
I attached all files which was shown in the error log as a ZIP-File.
I would really appreciate further help!
Best Regards
Description: |
|
 Download |
Filename: |
FilesToCheckPlease.zip |
Filesize: |
25.36 KB |
Downloaded: |
122 Time(s) |
|
|
Back to top |
|
 |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 165 Location: Germany

|
Posted: Thu Oct 22, 2020 1:30 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
I have attached the fixed files, except for the Birthday MOD, which you have to reinstall (just the file changes, not the database changes), and you can skip the changes already present in the files.
The fixes in the files below should already eliminate at least half of the errors and warnings (since they are consequential errors, just fixing "date" to "$date" fixes most of them), except for the various "Undefined variable" notifications of the Birthday MOD:
Code: | Notice: Undefined variable: birthday_today_list in /home/u333455499/public_html/forum7/index.php on line 318
Notice: Undefined variable: birthday_week_list in /home/u333455499/public_html/forum7/index.php on line 319
Notice: Undefined variable: users_lasthour in /home/u333455499/public_html/forum7/index.php on line 335
Notice: Undefined variable: users_today_list in /home/u333455499/public_html/forum7/index.php on line 362
Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 373
Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 374
Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 377
Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 378 |
Description: |
|
 Download |
Filename: |
fixedFiles.zip |
Filesize: |
25.34 KB |
Downloaded: |
120 Time(s) |
|
|
Back to top |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Fri Oct 23, 2020 9:06 am Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Hi StarWolf3000!
I´d removed the Birthday MOD und Chatbox MOD completly from all sources, of your pachted files.
But now if i try to open the forum, just nothing will be displayed - just an empty page. I have activated error logging in the php (7.1) configuration and added
Quote: | error_reporting(-1);
ini_set('display_errors', 1); |
in the common.php, too.
Without an error message i do not know what to.
Do you have further ideas?
Best Regards
|
|
Back to top |
|
 |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 165 Location: Germany

|
Posted: Fri Oct 23, 2020 9:42 am Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Do you have access to the server log?
Also setting display_errors doesn't work, if PHP encounters a fatal error before it can reach this statement, which seems to be the case for you.
|
|
Back to top |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Fri Oct 23, 2020 6:04 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Hi StarWolf,
here are the entries of the logfile:
Quote: | [23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: users_lasthour in /home/u333455499/public_html/forum7/index.php on line 277
[23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: users_today_list in /home/u333455499/public_html/forum7/index.php on line 304
[23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 315
[23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 316
[23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: logged_visible_today in /home/u333455499/public_html/forum7/index.php on line 319
[23-Oct-2020 17:47:11 UTC] PHP Notice: Undefined variable: logged_hidden_today in /home/u333455499/public_html/forum7/index.php on line 320
[23-Oct-2020 17:47:11 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /home/u333455499/public_html/forum7/chat/chatbox_config.php:119
Stack trace:
#0 /home/u333455499/public_html/forum7/chatbox_front.php(34): include_once()
#1 /home/u333455499/public_html/forum7/includes/page_header.php(465): require_once('/home/u33345549...')
#2 /home/u333455499/public_html/forum7/index.php(329): include('/home/u33345549...')
#3 {main}
thrown in /home/u333455499/public_html/forum7/chat/chatbox_config.php on line 119 |
I did attached the files in a ZIP again.
Please check it.
Thanks a lot (vielen Dank für den großartigen Support)
Description: |
|
 Download |
Filename: |
FilesToFix.zip |
Filesize: |
14.08 KB |
Downloaded: |
119 Time(s) |
|
|
Back to top |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Mon Oct 26, 2020 7:01 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
I have reviewed all scripts by self and removed all MODs. Now the forum can be started without any errors and login is also possible (using PHP 7.4).
Unfortunately the contents of existing posts are not displayed. Just emtpy Fields, see Attachment.
About a solution suggestion I would be very grateful!
Description: |
|
Filesize: |
34.25 KB |
Viewed: |
110 Time(s) |

|
Description: |
|
Filesize: |
45 KB |
Viewed: |
115 Time(s) |

|
|
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 217

|
Posted: Tue Oct 27, 2020 11:00 am Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Hi
I think that might come from bbcode.php, using preg_replace with the e modifier.
_________________ 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 |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Tue Oct 27, 2020 12:35 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Hi Vendethiel,
i´m sorry i do not understand what i have to do.
Could you give me an example please?
Here Line 119 if my bbcode.php:
Code: | // Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl); |
Description: |
|
 Download |
Filename: |
bbcode.php.txt |
Filesize: |
29.13 KB |
Downloaded: |
123 Time(s) |
|
|
Back to top |
|
 |
Vendethiel Board Member

Joined: 26 Oct 2014
      Posts: 217

|
Posted: Wed Oct 28, 2020 7:59 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
The code in that file seems to use preg_replace_callback, which is the correct variant to use (that some old mods didn't use).
Hard to say without seeing the errors or warnings on that page.
_________________ 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 |
|
 |
Doelli Board Member

Joined: 21 Oct 2020
Posts: 8

|
Posted: Wed Oct 28, 2020 8:31 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
Attached you will find the error.log and the common.php.
I am at the end and do not know what to do.
Description: |
|
 Download |
Filename: |
PHP_errors.log.txt |
Filesize: |
741 Bytes |
Downloaded: |
115 Time(s) |
Description: |
|
 Download |
Filename: |
common.php.txt |
Filesize: |
7 KB |
Downloaded: |
112 Time(s) |
|
|
Back to top |
|
 |
StarWolf3000 Board Member

Joined: 10 Jun 2010
          Posts: 165 Location: Germany

|
Posted: Thu Oct 29, 2020 12:46 pm Post subject: Re: phpBB2.0.23 for PHP7 Download |
|
|
It looks like the Chatbox MOD uses the old mysql extension and bypasses phpBB's database configuration, which is no longer supported as of PHP 7.0:
Code: | [28-Oct-2020 20:26:16 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/u333455499/public_html/forum7/common.php on line 110
[28-Oct-2020 20:26:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /home/u333455499/public_html/forum7/chat/chatbox_config.php:119
Stack trace:
#0 /home/u333455499/public_html/forum7/chatbox_front.php(34): include_once()
#1 /home/u333455499/public_html/forum7/includes/page_header.php(465): require_once('/home/u33345549...')
#2 /home/u333455499/public_html/forum7/index.php(271): include('/home/u33345549...')
#3 {main}
thrown in /home/u333455499/public_html/forum7/chat/chatbox_config.php on line 119 |
|
|
Back to top |
|
 |
|