[Tool] phpBB 2.0.18 to 2.0.19 Code Changes

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
21
75%
Very Good
4
14%
Good
0
No votes
Fair
1
4%
Poor
2
7%
 
Total votes: 28

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Thu Apr 20, 2006 11:26 pm

Pixellate,

There is nothing wrong with those lines you posted. Which is line 318?

Make sure that you have 3 closing braces after the message die and before the else, like this

Code: Select all

					if (!$db->sql_query($sql))
					{
						message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
					}
				}
			}
			else
Have you hugged someone today?

Pixellate
Registered User
Posts: 24
Joined: Wed Apr 12, 2006 6:26 am
Location: Sydney, Australia
Contact:

Post by Pixellate » Fri Apr 21, 2006 2:16 am

Here's the message I get now whenever I click 'Profile' on my forum:
Parse error: syntax error, unexpected '}' in /home/porkowog/public_html/forum/includes/usercp_register.php on line 334


Here's my code:

Code: Select all

			{
				message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
			}
         if ($row = $db->sql_fetchrow($result))
         {
            // Only compare one char if the zlib-extension is not loaded
            if (!@extension_loaded('zlib'))
            {
               $row['code'] = substr($row['code'], -1);
            }

            if ($row['code'] != $confirm_code)
            {
               $error = TRUE;
               $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
            }
            else
            {
               $sql = 'DELETE FROM ' . CONFIRM_TABLE . "
                  WHERE confirm_id = '$confirm_id'
                     AND session_id = '" . $userdata['session_id'] . "'";
               if (!$db->sql_query($sql))
               {
                  message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
               }
            }
         }
         else
         {      
            $error = TRUE;
            $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
         }
         $db->sql_freeresult($result);
      }
   } 
			}
			else
			{		
				$error = TRUE;
				$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
			}
			$db->sql_freeresult($result);
		}
	}

Really starting to bug me as you have said there is nothing wrong. I've copied the code exactly how you've done it and there are three }'s after the 'message_die' and before the 'else'.
Image
Pixellate :: Pixelation Administrator :: Visit Us :: Contact

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Fri Apr 21, 2006 2:44 am

You must be fixing something. The error lines keep moving down.

According to my file, line 334 is in this section

Code: Select all

	$passwd_sql = '';
	if ( !empty($new_password) && !empty($password_confirm) )
	{
		if ( $new_password != $password_confirm )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
		}
		else if ( strlen($new_password) > 32 )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long'];
		}
		else
just below what you pasted.
Have you hugged someone today?

Pixellate
Registered User
Posts: 24
Joined: Wed Apr 12, 2006 6:26 am
Location: Sydney, Australia
Contact:

Post by Pixellate » Fri Apr 21, 2006 3:08 am

Ok, this is the same area as your code:

Code: Select all

	$passwd_sql = '';
	if ( !empty($new_password) && !empty($password_confirm) )
	{
		if ( $new_password != $password_confirm )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
		}
		else if ( strlen($new_password) > 32 )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long'];
		}
		else
Image
Pixellate :: Pixelation Administrator :: Visit Us :: Contact

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Fri Apr 21, 2006 3:40 am

I don't find an error with that code either. Paste your complete usercp_register.php into My pastebin so I can see the line numbers and find exactly where the error is.
Have you hugged someone today?

Pixellate
Registered User
Posts: 24
Joined: Wed Apr 12, 2006 6:26 am
Location: Sydney, Australia
Contact:

Post by Pixellate » Fri Apr 21, 2006 5:10 am

Ok I have just copy and pasted my whole usercp_register.php file, hopefully you will find the problem and fix it up for me.
Image
Pixellate :: Pixelation Administrator :: Visit Us :: Contact

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Sat Apr 22, 2006 3:12 am

Pixellate,
You have a section of duplicated code, lines 318-326 and 327-335 are the same and should not both be there.

I pasted a working copy of usercp_register.php into My pastebin. Click the download link, save it to your computer and upload to your server. You shouldn't have any more errors.
Have you hugged someone today?

Pixellate
Registered User
Posts: 24
Joined: Wed Apr 12, 2006 6:26 am
Location: Sydney, Australia
Contact:

Post by Pixellate » Sat Apr 22, 2006 3:27 am

It has worked perfectly. Everything on the forum works as it should.

Thanks for your help once again Dicky, it's greatly appreciated. :D
Image
Pixellate :: Pixelation Administrator :: Visit Us :: Contact

DiSpy
Registered User
Posts: 68
Joined: Sun Jul 11, 2004 9:18 pm
Location: South Florida!
Contact:

Post by DiSpy » Fri Apr 28, 2006 3:34 pm

DragonMaster1 wrote:
asinshesq wrote:
jwchess wrote:I figure it out. If you enable html on the board, quoting no longer works.
On my board only admins were allowed to post html (own mod).
I disabled that and now quoting works correctly...

I can confirm this. If you allow html on your board (in my case, I allowed only <b> and <u>) then quoting does not work unless you leave in the original line in addition to the new line. In other words, you would change that part of the upgrade mod to this:

Code: Select all

#
#-----[ FIND ]---------------------------------------------
# Line 255
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");

#
#-----[ BEFORE, ADD ]---------------------------------------------
# 
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");
(the only change I made was to change "REPLACE WITH" to "BEFORE, ADD")

Alternatively, you can disable html on your board (which may be a good idea anyway and is what I ended up doing on my board).



I have not been allowing html and this quote problem still existed

However this fix of adding this extra line did fix it

Would there be any problems with keeping it added....as far a any security or board issues that it might/could cause?


I've applied this fix on my forums and all is well again, but i'd like to know if anyone got an answer to the above question (in bold)??

Also, i'm wondering if everyone else that is having this problem is also using the "Multi BBcode Mod"? My best guess is that is where the problem lies... just want some confirmation.

THANK YOU!
-DiSpy

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Fri Apr 28, 2006 3:38 pm

I think if you upgrade to 2.0.20 this entire problem goes away (but make sure if you do that that you apply the 2.0.20 fixes described in the first post of this topic: http://www.phpbb.com/phpBB/viewtopic.php?t=382680 ).

User avatar
nawz157
Registered User
Posts: 212
Joined: Mon Jan 16, 2006 8:12 pm

Post by nawz157 » Fri Apr 28, 2006 4:50 pm

Heyy, i dloaded the update, how do i install it?
My Support Template ... Your phpBB board URL: - http://lostinthehatch.com/ ... Template(s) used:Sapphic & allsat ... Any and all MODs: RSS ,ez portal ... Version of phpBB: UPTODATE ... Host: Siteground

Do you have a test account for - no

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Fri Apr 28, 2006 5:21 pm

nawz157 wrote: Heyy, i dloaded the update, how do i install it?

You install like a regular MOD.

How to Install MODs
Have you hugged someone today?

sickmusic
Registered User
Posts: 24
Joined: Fri Oct 25, 2002 1:22 pm
Location: London, UK
Contact:

Post by sickmusic » Fri May 19, 2006 3:58 pm

thanks for the update :D

one little glitch.. max login attempts doesn't seem to be working.

ive set number of attempts to 5
and time to wait 5

but there's no indication of number of login attempts being used up, or when all attempts have been used up, there's no locking mechanism in place.

anyone else had same probs, or can someone please suggest which files to look over again.. as I'm not seeing anything obvious.

many thanks

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Sun May 21, 2006 3:19 am

sickmusic wrote: thanks for the update :D

one little glitch.. max login attempts doesn't seem to be working.

ive set number of attempts to 5
and time to wait 5

but there's no indication of number of login attempts being used up, or when all attempts have been used up, there's no locking mechanism in place.

anyone else had same probs, or can someone please suggest which files to look over again.. as I'm not seeing anything obvious.

many thanks

Check login.php. That is where the phpbb_users table is updated with the number of user_login_tries and user_last_login_try. Also the phpbb_config table has a column for login_reset_time.
Have you hugged someone today?

billiec
Registered User
Posts: 5
Joined: Fri Nov 25, 2005 5:28 pm
Contact:

Error in user management after this update

Post by billiec » Mon Jun 05, 2006 5:03 pm

Hello,

Update went smoothly, no error messages.

After this update, when deleting a user via the admin panel, I received the following error message:

========

Could not delete auto-login keys for this user

DEBUG MODE

SQL Error : 1146 Table 'ocbcc7_ccmgchildcareontarioorg.phpbb_sessions_keys' doesn't exist

DELETE FROM phpbb_sessions_keys WHERE user_id = 599

Line : 191
File : admin_users.php

===========

I'm really not skilled with php...or phpBB... any ideas what this error is about and how to fix it?

board is at
http://www.childcaremanagement.ca/phpBB2/

thanks, in advance

Post Reply

Return to “[2.0.x] MOD Database Releases”