Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Error when upgrading to 1.0

edited September 2006 in Vanilla 1.0 Help
Hi, I just tried upgrading to version 1.0 from the 0.9.2.6 version I have running. I have: Linux Apache MySQL Version 4.1.11 PHP Version 4.3.9 I get to Step 2 of the installer (after changing permissions) and get an error when pressing the button to go to the next step. The database details have been loaded in correctly (using old_settings.php in the conf folder). The error is: "An error occurred while querying for an unauthenticated role. MySQL returned the following error message:" There is no error message from MySQL after that message. Any help most appreciated. I have a backup of the database and files and have reverted back to the old verison I was running without a problem.

Comments

  • Options
    i did the same update, a few weeks ago, and had iirc the very same issue. problem is, i cannot recall how i resolved it.....but it was very easy and quick. it is linked to the directory that that file is in..i may have deleetd the directory and uploaded my own complete archived directory.......it is a simple issue, that is all i can recall...sorry.
  • Options
    Thanks. I haven't found the easy quick fix yet :) I have tried again a few times but get the same problem - even when I'm not using my old_settings.php. Here's the full error: "Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /var/www/html/forum/setup/upgrader.php on line 504 Vanilla 1 Upgrader Vanilla Upgrade Wizard (Step 2 of 3) We came across some problems while upgrading Vanilla... An error occurred while querying for an unauthenticated role. MySQL returned the following error message:"
  • Options
    Can anyone offer any light to the end of my upgrade confusion?
  • Options
    MarkMark Vanilla Staff
    If you open up setup/upgrader.php and search for that error message, you will find these lines:

    $SelectSQL = "select RoleID from ".$DatabaseTables['Role']." where UnAuthenticated = '1'"; $RoleData = @mysql_query($SelectSQL, $Connection); if (!$RoleData) { $Context->WarningCollector->Add("An error occurred while querying for an unauthenticated role. MySQL returned the following error message: ... etc

    If you edit the mysql_query line and remove the @ symbol and then try to do the upgrade again, you should see the error message that mysql is failing to report.
  • Options
    Hi Mark, Unfortunately I get the exact same error, just the line number changes. "Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /var/www/html/forumnewr/setup/upgrader.php on line 505 Vanilla 1 Upgrader Vanilla Upgrade Wizard (Step 2 of 3) We came across some problems while upgrading Vanilla... An error occurred while querying for an unauthenticated role. MySQL returned the following error message: Below you can provide the connection parameters for the mysql server where your existing Vanilla database is set up so it can be upgraded. If you haven't done it yet, back up your existing Vanilla database before continuing."
  • Options
    MarkMark Vanilla Staff
    edited July 2006
    Well, if all you did was remove the @ symbol, the line number shouldn't have changed.

    It just dawned on me that you might also just try re-uploading the file. Sometimes parts are missing. It's worth a shot.

    What doesn't make sense to me is that it's basically saying that the connection is invalid.

    Doing basic connection tests with mysql is pretty easy. Create a new blank text file called mysqltest.php and put this inside:

    <?php // Turn on all errors error_reporting(E_ALL); // Customize your database connection $Host = "Your MySQL Host Name"; $User = "Your MySQL Username"; $Password = "Your MySQL Password"; $Database = "Your MySQL database name"; // Open a database connection (you may see some errors here) $Connection = mysql_connect($Host, $User, $Password); // Attempt to select your database if ($Connection && !mysql_select_db($Database, $Connection)) echo("Failed to connect to the '".$Database."' database."); ?>

    Give that a go and see what happens.
  • Options
    Thanks - I'll re-upload Vanilla and double check it. I initially uploaded the zip file and unzipped it on my server so I didn't think to check that the zip file may have got corrupted or something. I have triple checked the MySQL connection settings (they're working fine on the old version I'm running on Vanilla) and copying them into the test file above returns a blank page (i.e. no errors). Will let you know - and thanks!
  • Options
    Ok, I've just tried again from scratch and get the same error :( Anything else I can do?
  • Options
    Ok, echoed $SelectSQL and then pasted this into phpMyAdmin and I get this: "SQL query: Documentation SELECT RoleID FROM role WHERE UnAuthenticated = '1' LIMIT 0 , 30 MySQL said: Documentation #1054 - Unknown column 'RoleID' in 'field list' " Is this a bug?
  • Options
    edited August 2006
    So, I tried changing RoleID to rid and it gets a bit further but dies when trying to insert into the role table: "SQL query: INSERT INTO role( `Name` , `Active` , `PERMISSION_SIGN_IN` , `PERMISSION_HTML_ALLOWED` , `PERMISSION_RECEIVE_APPLICATION_NOTIFICATION` , `Permissions` , `Priority` , `UnAuthenticated` ) VALUES ( 'Unauthenticated', '1', '1', '1', '1', 'a:32:{s:23:"PERMISSION_ADD_COMMENTS";N;s:27:"PERMISSION_START_DISCUSSION";N;s:28:"PERMISSION_STICK_DISCUSSIONS";N;s:27:"PERMISSION_HIDE_DISCUSSIONS";N;s:28:"PERMISSION_CLOSE_DISCUSSIONS";N;s:27:"PERMISSION_EDIT_DISCUSSIONS";N;s:34:"PERMISSION_VIEW_HIDDEN_DISCUSSIONS";N;s:24:"PERMISSION_EDIT_COMMENTS";N;s:24:"PERMISSION_HIDE_COMMENTS";N;s:31:"PERMISSION_VIEW_HIDDEN_COMMENTS";N;s:44:"PERMISSION_ADD_COMMENTS_TO_CLOSED_DISCUSSION";N;s:25:"PERMISSION_ADD_CATEGORIES";N;s:26:"PERMISSION_EDIT_CATEGORIES";N;s:28:"PERMISSION_REMOVE_CATEGORIES";N;s:26:"PERMISSION_SORT_CATEGORIES";N;s:28:"PERMISSION_VIEW_ALL_WHISPERS";N;s:29:"PERMISSION_APPROVE_APPLICANTS";N;s:27:"PERMISSION_CHANGE_USER_ROLE";N;s:21:"PERMISSION_EDIT_USERS";N;s:31:"PERMISSION_IP_ADDRESSES_VISIBLE";N;s:30:"PERMISSION_MANAGE_REGISTRATION";N;s:21:"PERMISSION_SORT_ROLES";N;s:20:"PERMISSION_ADD_ROLES";N;s:21:"PERMISSION_EDIT_ROLES";N;s:23:"PERMISSION_REMOVE_ROLES";N;s:28:"PERMISSION_CHECK_FOR_UPDATES";N;s:38:"PERMISSION_CHANGE_APPLICATION_SETTINGS";N;s:28:"PERMISSION_MANAGE_EXTENSIONS";N;s:26:"PERMISSION_MANAGE_LANGUAGE";N;s:24:"PERMISSION_MANAGE_STYLES";N;s:27:"PERMISSION_ALLOW_DEBUG_INFO";N;s:27:"PERMISSION_DATABASE_CLEANUP";N;}', 0, '1' ) MySQL said: Documentation #1054 - Unknown column 'Active' in 'field list' " Why is this table causing problems? Here is a dump of the role table as it currently is: " CREATE TABLE `role` ( `rid` int(10) unsigned NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `PERMISSION_RECEIVE_APPLICATION_NOTIFICATION` enum('1','0') NOT NULL default '0', `Permissions` text, `Priority` int(11) NOT NULL default '0', `UnAuthenticated` enum('1','0') NOT NULL default '0', PRIMARY KEY (`rid`), UNIQUE KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `role` -- INSERT INTO `role` VALUES (1, 'anonymous user', '0', NULL, 0, '0'); INSERT INTO `role` VALUES (2, 'authenticated user', '0', NULL, 0, '0');"
  • Options
    Any ideas? :S
  • Options
    I'm a bit confused about your table structure there. Have you done anything at all to your vanilla database? Or got any funky extensions running?
  • Options
    I haven't changed the database manually at all. I have a few extensions running: extensions folder: AvatarUploader+ImageResizer.php Clipboard.php Style.php BBCode.php HtmlFormatter.php Timer.php BannerInsertion Markdown.php Whispers.php BannerInsertion.php PanelHider.php WhosOnline-1.0.6.php CategoryJumper.php QuickKeys.php Cleanup.php RawHtmlFormatter.php
  • Options
    There is also a table called LUM_Role: CREATE TABLE `LUM_Role` ( `RoleID` int(2) NOT NULL auto_increment, `Name` varchar(100) NOT NULL default '', `Icon` varchar(155) NOT NULL default '', `Description` varchar(200) NOT NULL default '', `CanLogin` enum('1','0') NOT NULL default '1', `CanPostDiscussion` enum('1','0') NOT NULL default '1', `CanPostComment` enum('1','0') NOT NULL default '1', `CanPostHTML` enum('1','0') NOT NULL default '1', `AdminUsers` enum('1','0') NOT NULL default '0', `AdminCategories` enum('1','0') NOT NULL default '0', `MasterAdmin` enum('1','0') NOT NULL default '0', `ShowAllWhispers` enum('1','0') NOT NULL default '0', `CanViewIps` enum('1','0') NOT NULL default '0', `Active` enum('1','0') NOT NULL default '1', PRIMARY KEY (`RoleID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; -- -- Dumping data for table `LUM_Role` -- INSERT INTO `LUM_Role` VALUES (1, 'Banned', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'); INSERT INTO `LUM_Role` VALUES (2, 'Douchebag', './images/db.gif', 'I am a complete and utter douchebag', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `LUM_Role` VALUES (3, 'Member', '', '', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1'); INSERT INTO `LUM_Role` VALUES (4, 'Moderator', '', '', '1', '1', '1', '1', '0', '1', '0', '0', '0', '1'); INSERT INTO `LUM_Role` VALUES (5, 'User Administrator', '', '', '1', '1', '1', '1', '1', '1', '0', '0', '0', '1'); INSERT INTO `LUM_Role` VALUES (6, 'Master Administrator', '', '', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1');
  • Options
    Yeah it should really be using that second table. Where on earth did it get the idea to use the 'role' table? Mark?
  • Options
    MarkMark Vanilla Staff
    I wish I had time to look at this personally, but I don't.

    It seems like it's totally failing to perform any of the upgrades or interact with your mysql db at all.
  • Options
    Hmmm..... the forum is running fine as it is, so it's definitely interacting with the database. I just can't figure out why it's not working for the upgrade.
  • Options
    Ok the problem: Drupal was also installed which had a table called role. Vanilla was getting confused in the upgrade.
  • Options
    Deleting the role table (I didn't need Drupal any more) fixed the problem. YAY!
This discussion has been closed.