Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 10-18-2016, 07:16 AM
gxnpt's Avatar
gxnpt gxnpt is offline
Contributing Member
 
Join Date: 09-10-16
Location: far west Florida near Destin
Posts: 104
iTrader: 0 / 0%
phpBB glitch



I let my web host update PHP versions (from 5.5 to 7) and it broke phpBB.

So, there was an update available - but it made no difference. Had to do with adding extra items into the bb code (in my case other media types it will display) so am unsure if you will run into it if no new media types have been added.

Here is the quick fix -

phpBB-3.1.10

phpBB3\includes\bbcode.php

line 370
PHP Code:
$bbcode_tpl preg_replace('/{L_([A-Z0-9_]+)}/[COLOR="Red"][B]e[/B][/COLOR]'"(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))"$bbcode_tpl); 
just drop that letter e
PHP Code:
$bbcode_tpl preg_replace('/{L_([A-Z0-9_]+)}/'"(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))"$bbcode_tpl); 
reason the issue appeared

Version Description
7.0.0 Support for the /e modifier has been removed. Use preg_replace_callback() instead.
5.5.0 The /e modifier is deprecated. Use preg_replace_callback() instead. See the PREG_REPLACE_EVAL documentation for additional information about security risks.

If the quick fix leaves issues (if you actually needed the e modifier functionality) see the references. This is likely to be a rare situation.

reference:

php.net/manual/en/function.preg-replace-callback.php

php.net/manual/en/function.preg-replace.php
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 11-24-2016, 11:38 AM
gxnpt's Avatar
gxnpt gxnpt is offline
Contributing Member
 
Join Date: 09-10-16
Location: far west Florida near Destin
Posts: 104
iTrader: 0 / 0%
It still breaks with extra media types added - I just switched forum scripts instead of tracking it down across multiple files. I do not recommend phpBB-3.1.10 at this time.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you help with some css glitch ? bestofmoney.info Blogging Forum 1 01-26-2008 06:44 AM
Need help with glitch in design devilzfan300 Web Design Lobby 1 12-18-2006 05:06 AM
Skin phpbb forum, edit phpbb template raciviusdawn Coding Forum 9 10-19-2003 12:02 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:36 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC