Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2019-11-26 22:07:20

webikl
Member
Registered: 2019-11-26
Posts: 5

PHP warning: PUN ACTIVE PAGE

Hello,

I am using FluxBB version 1.5.11 and PHP version 7.3. My error log shows the following errors:

[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 194
[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 197
[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 200
[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 203
[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 207
[26-Nov-2019 17:06:31 America/New_York] PHP Warning:  Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 208

How to fix this error?

Thank you.

Offline

#2 2019-11-27 01:09:52

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,276
Website

Re: PHP warning: PUN ACTIVE PAGE

On which page do these warings appear?

Offline

#3 2019-11-27 01:30:18

webikl
Member
Registered: 2019-11-26
Posts: 5

Re: PHP warning: PUN ACTIVE PAGE

Hi Visman, I only see errors in the error log accessed via cpanl. The errors do not appear on any of website pages and all pages seem to be functioning OK.

Offline

#4 2019-11-27 01:55:00

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,276
Website

Re: PHP warning: PUN ACTIVE PAGE

include/common.php
replace

error_reporting(E_ALL ^ E_NOTICE);

to

error_reporting(E_ALL);
ini_set('display_errors', 1);

After that, errors should be visible on the pages. First of all, look at the pages of installed modifications, if any.

Offline

#5 2019-11-27 02:02:49

webikl
Member
Registered: 2019-11-26
Posts: 5

Re: PHP warning: PUN ACTIVE PAGE

Oh I see, it is a new page that I created. It is showing me the following:

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 194

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 197

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 200

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 203

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 207

Warning: Use of undefined constant PUN_ACTIVE_PAGE - assumed 'PUN_ACTIVE_PAGE' (this will throw an Error in a future version of PHP) in /home/pligqbxy/public_html/header.php on line 208

How to fix this PUN_ACTIVE_PAGE issue?

Offline

#6 2019-11-27 02:10:08

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,276
Website

Re: PHP warning: PUN ACTIVE PAGE

For new pages before calling

require PUN_ROOT.'header.php';

add

define('PUN_ACTIVE_PAGE', 'index');

Offline

#7 2019-11-27 02:33:00

webikl
Member
Registered: 2019-11-26
Posts: 5

Re: PHP warning: PUN ACTIVE PAGE

The header.php code that you specified was already present in the file. I added the second coded that you provided and that fixed the problem or error. It is interesting to note that the word 'index' in the second code can be substituted with the 'name' of the page and this still works without showing any errors. Thank you for your help!

Offline

#8 2019-11-27 23:29:13

wimc
Member
From: Washington State
Registered: 2010-10-31
Posts: 114

Re: PHP warning: PUN ACTIVE PAGE

webikl wrote:

The header.php code that you specified was already present in the file.

Was meant to add before that.

Last edited by wimc (2019-11-27 23:32:08)

Offline

#9 2019-11-28 01:02:19

webikl
Member
Registered: 2019-11-26
Posts: 5

Re: PHP warning: PUN ACTIVE PAGE

Hi wimc. Thanks for clarifying :-)

Offline

Board footer

Powered by FluxBB