annedi Posted January 18, 2023 Posted January 18, 2023 I switched to PHP 8.0 and initiated the upgrade. Something went wrong and now there is a corrupt database table ultraviocore_theme_templates. This table also generates the error message incorrect key file for table 'ultravioletcore_theme_templates'. Selecting that table and running repair table fails. What do I do now?
Jim M Posted January 18, 2023 Posted January 18, 2023 Please contact your hosting provider for assistance in repairing or restoring your database. If they are unable to repair the database, you will need to restore your database from a backup you took prior to attempting the upgrade.
annedi Posted January 18, 2023 Author Posted January 18, 2023 After the first attempted upgrade, I had our host, Site5, restore the DB from a backup. But when I ran the upgrade (for the 2nd time), the same corruption occurred with the "incorrect key file" error message. There seems to be no point in another restoration and a 3rd upgrade attempt. FWIW, my website is currently running just fine except that the Default Theme is not useable. The tweaked Themes I created are running just fine. Is there a way for me to recreate the corrupt table and add a key or index (or whatever) to it?
Jim M Posted January 18, 2023 Posted January 18, 2023 Incorrect key file is an issue with your MySQL server that would need to be resolved. Typically happens when your tmp directory is too small for MySQL. However, this would be for your hosting provider to investigate and resolve. We can provide you the schema of that table but as that table holds data about themes, you would lose all data on those themes.
annedi Posted January 18, 2023 Author Posted January 18, 2023 (edited) Currently there seems to be no data in that table. OK, I will check on the tmp directory size. Would you happen to know which tmp directory? Is it a tmp file in the Invision installation? Or is it a tmp file on the hosting server? Thank you. Edited January 18, 2023 by annedi
Jim M Posted January 18, 2023 Posted January 18, 2023 Just now, annedi said: Currently there seems to be no data in that table. OK, I will check on the tmp directory size. Would you happen to know which tmp directory? Is it a tmp file in the Invision installation? Or is it a tmp file on the hosting server? Thank you. Sorry, this would be something you would need to investigate with your hosting provider or server administrator. Hosting support is outside our scope of support.
annedi Posted January 18, 2023 Author Posted January 18, 2023 Is there a way to put my website into Maintenance Mode?
annedi Posted January 18, 2023 Author Posted January 18, 2023 (edited) Also, where can I find the server requirements for the Upgrade. I know about PHP 8.0. But what are the Mysql requirements? Also, Is there a way to put my website into Maintenance Mode? Mark as Solution Edited January 18, 2023 by annedi
Jim M Posted January 18, 2023 Posted January 18, 2023 There is not a maintenance mode. You can take it offline for all but your staff using ACP -> System -> General Configuration -> Site Online.
annedi Posted January 18, 2023 Author Posted January 18, 2023 Ah! OK. Thank you re "Site Online". Requirements for Mysql?
Jim M Posted January 18, 2023 Posted January 18, 2023 Just now, annedi said: Ah! OK. Thank you re "Site Online". Requirements for Mysql? You're very welcome. Just MySQL 5.6 or higher right now is our baseline. Everything can be seen here in our compatibility checker: http://www.invisioncommunity.com/files/file/7046-get-ready-for-ips-40/
annedi Posted January 18, 2023 Author Posted January 18, 2023 Cool. I'll run that. Thank you. All for now.
annedi Posted January 18, 2023 Author Posted January 18, 2023 FWIW, the Site Online button does not work to put my website Offline. It seems like something is wrong with the Admin interface also.
annedi Posted January 18, 2023 Author Posted January 18, 2023 (edited) And so..... The Site5 server people say that there is plenty of space in our account. And I specifically told them TMP space was the issue (like you all said). We are set to PHP 8.0 and Mysql 5.6. I cannot take the website Offline thru the Admin interface. It just keeps running! The Default Theme does not work correctly. The customized Themes (2) work just fine. Attempting to Upgrade continues to fail. SELECT *, INSTR(',3,1,0,', CONCAT(',',template_set_id,',') ) as theorder FROM `ultraviocore_theme_templates` AS `core_theme_templates` WHERE template_set_id IN (3,1,0) AND template_app IN ('forums') AND template_location IN ('front') AND template_group IN ('index') ORDER BY template_location, template_group, template_name, theorder desc IPS\Db\Exception: Incorrect key file for table 'ultraviocore_theme_templates'; try to repair it (1034) #0 /home3/ultravio/public_html/content/system/Db/Select.php(388): IPS\_Db->preparedQuery('/*ultravio_ipb:...', Array, true) #1 /home3/ultravio/public_html/content/system/Db/Select.php(446): IPS\Db\_Select->runQuery() #2 /home3/ultravio/public_html/content/system/Theme/Theme.php(3566): IPS\Db\_Select->rewind() #3 /home3/ultravio/public_html/content/system/Theme/Theme.php(2680): IPS\_Theme->getRawTemplates(Array, Array, Array) #4 /home3/ultravio/public_html/content/system/Theme/Theme.php(845): IPS\_Theme->compileTemplates('forums', 'front', 'index') #5 /home3/ultravio/public_html/content/applications/forums/modules/front/forums/index.php(216): IPS\_Theme->getTemplate('index') #6 /home3/ultravio/public_html/content/system/Dispatcher/Controller.php(118): IPS\forums\modules\front\forums\_index->manage() #7 /home3/ultravio/public_html/content/applications/forums/modules/front/forums/index.php(52): IPS\Dispatcher\_Controller->execute() #8 /home3/ultravio/public_html/content/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\front\forums\_index->execute() #9 /home3/ultravio/public_html/content/index.php(13): IPS\_Dispatcher->run() #10 {main} Edited January 18, 2023 by annedi
annedi Posted January 18, 2023 Author Posted January 18, 2023 And here is another error. TypeError: array_keys(): Argument #1 ($array) must be of type array, string given in /home3/ultravio/public_html/content/system/Theme/Theme.php:694 Stack trace: #0 /home3/ultravio/public_html/content/system/Theme/Theme.php(694): array_keys('{"d0e70b4cbb9ab...') #1 /home3/ultravio/public_html/content/system/Theme/Theme.php(885) : eval()'d code(2131): IPS\_Theme->resource('/notifyIcons/', 'core', 'front', false) #2 /home3/ultravio/public_html/content/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_global_global->includeJS() #3 /home3/ultravio/public_html/content/system/Theme/Theme.php(885) : eval()'d code(1284): IPS\Theme\_SandboxedTemplate->__call('includeJS', Array) #4 /home3/ultravio/public_html/content/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_global->globalTemplate('b3f00ce7eb3dfd7...', '<span style='ba...', Array) #5 /home3/ultravio/public_html/content/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #6 /home3/ultravio/public_html/content/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish() #7 /home3/ultravio/public_html/content/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Standard->finish() #8 /home3/ultravio/public_html/content/admin/index.php(13): IPS\_Dispatcher->run() #9 {main}
Marc Posted January 19, 2023 Posted January 19, 2023 You will get other errors if that table is crashed. The software itself cant break a table. Your hosting company would need to take a look at that issue unfortunately. If its set as MyIsam, you could switch it to INNODB and try. Ive seen that work when people have had issues with their mysql instance in the past
annedi Posted January 20, 2023 Author Posted January 20, 2023 I'm at a bit of a loss here. Kindly, let me review - just in case it results in some new suggestions. [hr] My website was running fine with no system errors. I ran the upgrade. It halted with errors. Now I have a table, ultraviocore_theme_templates which is listed as a table but which has no data and no structure when I look at in phpAdmin. Repair table does not work on this table. My Admin interface is broken in part, and I cannot use the Offline button and some other features. Surprisingly, my website keeps on running even with the customized Themes even though the damaged ultraviocore_theme_templates table has no data or no structure. I have the array_keys() error experienced by others. (Error message in posts above.) Checking with the hosting company gave these results: PHP and Mysql are both up-to-date, and we have plenty of space allotted to my website. [hr] Woo! This is all kinda goofy. Yeah, I know, I will have ask the hosting server to restore us back to a week or so ago. We will lose some posts. I think I will have to skip the upgrade for now.
teraßyte Posted January 20, 2023 Posted January 20, 2023 Considering the table's name you can probably ask your hosting to simply restore that single table instead of the full backup.
Marc Posted January 20, 2023 Posted January 20, 2023 First recommendation we can make here is to ensure your database is set as recommended. You can see this if you go to support in your admin CP. I suspect tables are probably set as MyISAM and not INNODB, just based on experience on what you are having issues with.
annedi Posted January 21, 2023 Author Posted January 21, 2023 Yes, lookiing at the DB via PhpAdmin, I see that there are a few tables which are Myisam and not innodb. (I probabIy inherited this website in that condition.) I will update the Myisams to INNODB. When I go to Support in ACP, the Database block shows a spinning wheelie.
annedi Posted January 21, 2023 Author Posted January 21, 2023 And so, I updated the few Myisam tables to INNODB. Except this cannot be done for the broken table ultraviocore_theme_templates which is "in use" and does not permit any alterations. Terabyte, good idea. I'll see if that can be done. Thanks.
Marc Posted January 23, 2023 Posted January 23, 2023 The table that is showing in use can only really be resolved by your hosting company, as that table is in a crashed state
annedi Posted January 23, 2023 Author Posted January 23, 2023 (edited) And so..... We rolled the DB back to 4 days before the upgrade snafu and I went back to PHP 7.4. Eventually I got the website running ok (had to clear caches, etc.) We did not lose too much data. I have updated [added: for the 2nd time] any MyIsam table types to InnoDB. I'm a little bit hesitant to try the upgrade for 3rd time!! 😬 While the upgrade crash is not exactly solved in the sense that anybody could tell me what happened, given that I'm up and running again please go ahead and close this topic (or whatever). Thank you to everyone who made suggestions.😀 Andrea B. Edited January 23, 2023 by annedi
Marc Posted January 24, 2023 Posted January 24, 2023 I would suggest trying an upgrade now you have switched everything to INNODB. Also, ensure you back up the current state before you do this
Recommended Posts