Undefined constant STRIP since update to 3.0.9

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Thu Aug 04, 2011 9:22 am

Hi!

Since i've updated my board from phpbb3 3.0.8 to 3.0.9 i'm getting a lot of this warnings in my php errorlog:

Code: Select all

[02-Aug-2011 08:19:19] PHP Notice:  Use of undefined constant STRIP - assumed 'STRIP' in /forum/includes/functions.php on line 54
I've checked the functions.php file against the phpbb3 fullpackage, there is no difference between this 2 files. Additionally i've checked my startup.php (where STRIP is defined) and common.php (where the startup.php file is loaded). There is no difference too.

Any hint how i can fix this? Thanks in advance for a reply.

User avatar
AmigoJack
Registered User
Posts: 5601
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Thu Aug 04, 2011 10:42 am

You have to search all non-default files for the usage of e.g. set_var( and trace down which files do not include /includes/startup.php or /common.php. I suspect MODs.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Thu Aug 04, 2011 12:13 pm

Hey, thanks for your quick reply. :D

Tapatalk (http://tapatalk.com/) is the only mod which uses set_var( and doesn't include startup.php or common.php. I've posted this in the tapatalk forums, think they will fix this in the next version.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Fri Aug 05, 2011 10:18 am

Mhhh, they have told me that they include common.php.

At my server this files uses the set_var( function:

/includes/functions.php
/includes/message_parser.php
/includes/functions_upload.php
/mobiquo/function/login.php (from the tapatalk plugin)
/includes/auth/auth_apache.php
/includes/auth/auth_db.php

I've compared all files with the original from phpbb 3.0.9, no difference between them.

Any other hints how to fix this? Thanks in advance for a reply.
Last edited by Fisch.666 on Fri Aug 05, 2011 11:27 am, edited 1 time in total.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by RMcGirr83 » Fri Aug 05, 2011 10:55 am

STRIP is defined within startup.php (lines 100 to 120). Try comparing your startup.php file against a fresh one from download of phpBB.

startup is also set as required within common.php so you may want to check that file too while you are at it.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Fri Aug 05, 2011 11:17 am

Hey, thanks for your reply

I've compared both versions against a fresh downloaded 3.0.9:
Fisch.666 wrote: Additionally i've checked my startup.php (where STRIP is defined) and common.php (where the startup.php file is loaded). There is no difference too.

User avatar
AmigoJack
Registered User
Posts: 5601
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Fri Aug 05, 2011 11:20 am

How about a link to the actual MOD instead of their homepage only?
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
T0ny
Registered User
Posts: 1383
Joined: Sun Jan 29, 2006 8:42 pm
Location: Lancashire
Name: Tony

Re: Undefined constant STRIP since update to 3.0.9

Post by T0ny » Fri Aug 05, 2011 11:20 am

I'd be tempted to edit the set_var() function in includes/functions.php and temporarily add the lines

Code: Select all

		if (!defined('STRIP'))
		{
			die('STRIP undefined: [' . $result . ']');
		}
before the line

Code: Select all

		$result = (STRIP) ? stripslashes($result) : $result;
then play with the forum through both the standard and tapatalk interfaces until you see an error message.

This should then tell you what value is being set at the time, which might help narrow down where the problem is.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Fri Aug 05, 2011 11:24 am

@AmigoJack

Because you have to create an account at the tapatalk hp to get this plugin. :oops:

http://tapatalk.com/download.php

@T0ny

Ok, thanks for this hint. Will try this to narrow down this problem. :)

User avatar
AmigoJack
Registered User
Posts: 5601
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Fri Aug 05, 2011 11:29 am

Fisch.666 wrote:Because you have to create an account at the tapatalk hp to get this plugin
Then my support ends here. What keeps you from attaching the MOD here or upload it somewhere else and send me the link via PM if you don't want to share it to others aswell? You have to understand that I need to check the sources and the modification instructions and refuse to sign up here and there for every new user and his problems.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

SuperFedya
Registered User
Posts: 248
Joined: Sun Jul 14, 2002 9:14 pm
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by SuperFedya » Wed Sep 14, 2011 12:15 am

Same problem. My startup.php is 100% same that default from 3.0.9. Any ideas?

PHP Notice: Use of undefined constant STRIP - assumed 'STRIP' in /var/www/madfanboy.com/forum/includes/functions.php on line 54

Line 54:
$result = (STRIP) ? stripslashes($result) : $result;

Thanks

User avatar
AmigoJack
Registered User
Posts: 5601
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Wed Sep 14, 2011 7:48 am

AmigoJack wrote:You have to search all non-default files for the usage of e.g. set_var( and trace down which files do not include /includes/startup.php or /common.php. I suspect MODs.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Thu May 24, 2012 2:14 pm

Hi,

this notices were very annoying so i've just replaced:

Code: Select all

$result = (STRIP) ? stripslashes($result) : $result;
with

Code: Select all

$result = ('STRIP') ? stripslashes($result) : $result;
I don't know if this is a very good solution but as far as i was able to test my forum this fixed the notices and the forum is still working.

User avatar
AmigoJack
Registered User
Posts: 5601
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Thu May 24, 2012 2:18 pm

That always evaluates to TRUE - you could also write:

Code: Select all

$result = stripslashes($result);
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Thu May 24, 2012 4:01 pm

Hi,

the constant STRIP is defined in constants.php as true or false depending on the used php version and according to the PHP Notice:

Code: Select all

Use of undefined constant STRIP - assumed 'STRIP' in includes/functions.php on line 54
PHP is using 'STRIP' instead of STRIP in the line 54 so this shouldn't be true all the time?

Locked

Return to “[3.0.x] Support Forum”