Page 20 of 24

Posted: Sun Mar 06, 2005 5:02 pm
by PCTalk
I found many references to this problem early in this discussion but non of them seem to apply to me, so will ask my question with as much precision as possible.

In the change file, right at the beginning is the code for changing admin/admin_db_utilities.php.

It says to find (on line 696) something that starts with "$tables = array('auth_access',"

I have compared my admin_db_utilities.php file and an unmodified version of the same file. The unmodified version looks as follows:

Code: Select all

				include('./page_footer_admin.'.$phpEx);
			}

			$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');

			$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
My modified version, however, looks like:

Code: Select all

				include('./page_footer_admin.'.$phpEx);
			}

			$phpbb_only = (!empty($HTTP_POST_VARS['phpbb_only'])) ? $HTTP_POST_VARS['phpbb_only'] : ( (!empty($HTTP_GET_VARS['phpbb_only'])) ? $HTTP_GET_VARS['phpbb_only'] : 0 );
			switch ( SQL_LAYER )
			{
				case 'mysql':
				case 'mysql4':
					$sql = 'SHOW TABLES';
					$field = "Tables_in_{$dbname}";
					break;
				case 'postgresql':
					$sql = "SELECT relname
						FROM pg_class
						WHERE relkind = 'r'
						AND relname NOT LIKE 'pg\_%'";
					$field = "relname";
					break;
			}
			$result = $db->sql_query($sql);
			while ($row = $db->sql_fetchrow($result))
			{
				$current_table = $row[$field];
				$current_prefix = substr($current_table, 0, strlen($table_prefix));
				if ($phpbb_only && $current_prefix != $table_prefix)
				{
					continue;
				}
				else
				{
					$tables[] = $current_table;
				}
			}

			$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
Nowhere in the entire file can I find even the string "auth_access", much less the rest of the change to add ", 'confirm'" to the end. It appears my version is reading information dynamically.

Anyone have any suggestions? I know 2.0.13 is out already. I want to update to 2.0.12 first ... :?

[Added]
I have gone through the entire update process and the above problem is the only one I had. I have not uploaded the changed files however, as I would like a definitive answer to my question first.

Posted: Mon Mar 07, 2005 12:27 am
by Fabikus
I have a problem... i don't know if the problem was update of my board to latest version but now when i try to search an username in my ADMIN panel (also in permission panel) it gives me a blank page without displaying me detalis of user. But if i try to click to an username nickname (where you see who is on line) in my Admin index page it works correctly... why???

Re: [Tool] phpBB 2.0.11 to phpBB 2.0.12 Code Changes

Posted: Mon Mar 07, 2005 9:34 am
by davenewt
MOD Database Manager wrote: MOD Name: phpBB 2.0.11 to phpBB 2.0.12 Code Changes
...
Download File: phpbb_2011_to_2012.zip


When I download this, all the files are named 2.0.10_to_2.0.11 - not 2.0.11_to_2.0.12...

//edit - scrap that... I was automatically unzipping the old download file which was still sitting in my downloads directory, instead of looking properly for the new zip. Apologies :)

Thanks,
Dave.

Posted: Tue Mar 08, 2005 2:19 am
by BlueRook
PCTalk, do you have and MODs that affect your database backup functions? Such as the Complete Database Backup MOD? If so then that is most likely the cause of your difference.

Posted: Tue Mar 08, 2005 2:23 am
by BlueRook
ilmorris, it still looks like you might have missed something or edited too much.

Code: Select all

t] . '_i]'; } return $varref; } } ?>
That really looks like you are missing a closing } somewhere. I would restore to your original version, test the board, and if it works carefully go through the changes again.

Posted: Tue Mar 08, 2005 2:26 am
by BlueRook
Detrusor, are you using a CMS addon, something like Post-Nuke, or a port of phpBB? Because that code doesn't exist in a vanilla install of phpBB. You will need to contact the support of whoever did your port/cms.

Posted: Tue Mar 08, 2005 2:28 am
by BlueRook
Oztrance, check all the files that were modified and make sure that there are no spaces after the ?> at the end of the files.

Posted: Tue Mar 08, 2005 2:34 am
by BlueRook
JT-KGY wrote: Hi! I updated my phpbb from 2.0.10 to 2.0.11 then 2.0.12..

then I discover that whenever I post/reply with ' then I get an sql error.


I've been looking and I haven't seen that you have posted the actual error you get. I looked at your common.php code that you posted and as far as I can tell it is the same that comes with 2.0.12, so that shouldn't be the problem barring that you didn't miss a change somewhere else.

Posted: Tue Mar 08, 2005 2:34 am
by JT-KGY
Could someone also give me a hand... Please.
:(

Posted: Tue Mar 08, 2005 2:34 am
by BlueRook
JT-KGY wrote: Could someone also give me a hand... Please.
:(


Check above.

Posted: Tue Mar 08, 2005 4:38 am
by PCTalk
BlueRook wrote: PCTalk, do you have and MODs that affect your database backup functions? Such as the Complete Database Backup MOD? If so then that is most likely the cause of your difference.


Yes, I do have the Complete Database Backup MOD installed. Does that mean I can safely ignore that one section?

[Added]
OK, followed your link and answered my own question, thanks!
ultima528 wrote:

Code: Select all

$tables[] = 'links';
That line was only added by Niels so that the links table is backed up when you want to back up. The need to add that has been removed by this MOD, so it automatically backs the table up (assuming you choose that in the options).

Basically, you don't need to add that line for the Links MOD to work properly, and not adding it will not affect your ability to back the links table up (assuming you have installed my MOD).


I know they were talking about adding "links" but conceivably it now creates a dynamic list of tables, so there is no more need to add each individual table.

Posted: Tue Mar 08, 2005 5:35 am
by JT-KGY
BlueRook wrote:
JT-KGY wrote:Could someone also give me a hand... Please.
:(


Check above.


Thank you, here's the error I got...functions_post.php
SQL Error : 1064 You have an error in your SQL syntax near ''mllkjlkjl'')' at line 1

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')


This happens in ANY SQL call that has includes ' fails...
I saw that common.php is supposed to call addslashes to all parameters..
looks like that stop happening after I upgrade to 2.0.12

I tried backdate the common.php back to 2.0.10.. then posting with '
went through successfully... but of course I can't be using that version
since I have already updated everything else (including DB) to
2.0.12

I am using a 3rd party customized style.. will this be a problem?
I have no problem using the style with 2.0.10 code though.

Posted: Tue Mar 08, 2005 5:39 am
by JT-KGY
JT-KGY wrote:
BlueRook wrote:
JT-KGY wrote:Could someone also give me a hand... Please.
:(


Check above.


Thank you, here's the error I got...functions_post.php
SQL Error : 1064 You have an error in your SQL syntax near ''mllkjlkjl'')' at line 1

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')


This happens in ANY SQL call that has includes ' fails...
I saw that common.php is supposed to call addslashes to all parameters..
looks like that stop happening after I upgrade to 2.0.12

I tried backdate the common.php back to 2.0.10.. then posting with '
went through successfully... but of course I can't be using that version
since I have already updated everything else (including DB) to
2.0.12

I am using a 3rd party customized style.. will this be a problem?
I have no problem using the style with 2.0.10 code though.

Posted: Tue Mar 08, 2005 5:54 am
by BlueRook
There appears to be an extra quote in that line

Code: Select all

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')

Posted: Tue Mar 08, 2005 6:05 am
by BlueRook
I've looked at all the changes from 2.0.10 to now and I don't see any changes to the posting functions. So I'm wondering if you have a problem with some other edit you made.