SQLSTATE error SQLSTATE[42S01]

I am creating a new install as my upgrade wont work. But for some reason I cannot get passed the install screen as I get the following error below. I run the latest versions of PHP8 and MySQL and from what I can see there were no warnings etc that I know of. Any guidance is appreciated:

A database error has occurred: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'journals' already exists (SQL: create table `journals` (`journal_id` bigint not null auto_increment primary key, `path` varchar(32) not null, `seq` double(8, 2) not null default '0' comment 'Used to order lists of journals', `primary_locale` varchar(14) not null, `enabled` smallint not null default '1' comment 'Controls whether or not the journal is considered \"live\" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)', `current_issue_id` bigint null) default character set utf8 collate 'utf8_general_ci') 

When I check the database the tables have been created.

  • would you mind indicating which version you’re installing?

Thanks,

Roger
PKP Team

Sorry my bad, the latest 3.4

please remove dois and doi_setting from database and try again

Just tried that and after hitting install the same happens. But then with this error:

A database error has occurred: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'journals' already exists (SQL: create table `journals` (`journal_id` bigint not null auto_increment primary key, `path` varchar(32) not null, `seq` double(8, 2) not null default '0' comment 'Used to order lists of journals', `primary_locale` varchar(14) not null, `enabled` smallint not null default '1' comment 'Controls whether or not the journal is considered \"live\" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)', `current_issue_id` bigint null) default character set utf8 collate 'utf8_general_ci')

This is what my error log shows:

[21-Jun-2023 10:13:15 UTC] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'journals' already exists (SQL: create table `journals` (`journal_id` bigint not null auto_increment primary key, `path` varchar(32) not null, `seq` double(8, 2) not null default '0' comment 'Used to order lists of journals', `primary_locale` varchar(14) not null, `enabled` smallint not null default '1' comment 'Controls whether or not the journal is considered \"live\" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)', `current_issue_id` bigint null) default character set utf8 collate 'utf8_general_ci')
[21-Jun-2023 10:20:53 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getVersionString() on null in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php:211
Stack trace:
#0 /home/public_html/panoply/classes/core/Application.php(50): PKP\core\PKPApplication->__construct()
#1 /home/public_html/panoply/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#2 /home/public_html/panoply/index.php(18): require_once('/home/...')
#3 {main}
  thrown in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php on line 211
[21-Jun-2023 10:20:57 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getVersionString() on null in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php:211
Stack trace:
#0 /home/public_html/panoply/classes/core/Application.php(50): PKP\core\PKPApplication->__construct()
#1 /home/public_html/panoply/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#2 /home/public_html/panoply/index.php(18): require_once('/home/...')
#3 {main}
  thrown in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php on line 211
[21-Jun-2023 10:20:58 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getVersionString() on null in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php:211
Stack trace:
#0 /home/public_html/panoply/classes/core/Application.php(50): PKP\core\PKPApplication->__construct()
#1 /home/public_html/panoply/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#2 /home/public_html/panoply/index.php(18): require_once('/home/...')
#3 {main}
  thrown in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php on line 211
[21-Jun-2023 10:20:58 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getVersionString() on null in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php:211
Stack trace:
#0 /home/public_html/panoply/classes/core/Application.php(50): PKP\core\PKPApplication->__construct()
#1 /home/public_html/panoply/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#2 /home/public_html/panoply/index.php(18): require_once('/home/...')
#3 {main}
  thrown in /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php on line 211

its fresh installation or upgradation
Journal _id is present means old one is till there please remove complete database and install fresh one

No its a fresh one. I swiped the database. Restarted the install process and the screen loads and then pushes me back to the same screen with these error messages.

Please remove complete once and share error

Errors occurred during installation
A database error has occurred: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `metrics_submission_geo_daily` add unique `msgd_uc_load_context_submission_c_r_c_date`(`load_id`, `context_id`, `submission_id`, `country`, `region`, `city`, `date`))

And the log states this:

[21-Jun-2023 12:23:07 UTC] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rodoslov_ojs.journals' doesn't exist in /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:444
Stack trace:
#0 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(444): PDO->prepare('SELECT * FROM j...')
#1 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}('SELECT * FROM j...', Array)
#2 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback('SELECT * FROM j...', Array, Object(Closure))
#3 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(456): Illuminate\Database\Connection->run('SELECT * FROM j...', Array, Object(Closure))
#4 [internal function]: Illuminate\Database\Connection->cursor('SELECT * FROM j...', Array)
#5 /home/public_html/panoply/lib/pkp/classes/context/ContextDAO.php(99): Generator->current()
#6 /home/public_html/panoply/lib/pkp/classes/core/PKPRouter.php(194): PKP\context\ContextDAO->getByPath('journal')
#7 [internal function]: PKP\core\PKPRouter->getContext(Object(APP\core\Request))
#8 /home/public_html/panoply/lib/pkp/classes/core/PKPRequest.php(861): call_user_func_array(Array, Array)
#9 /home/public_html/panoply/lib/pkp/classes/core/PKPRequest.php(753): PKP\core\PKPRequest->_delegateToRouter('getContext')
#10 /home/public_html/panoply/classes/core/Request.php(41): PKP\core\PKPRequest->getContext()
#11 /home/public_html/panoply/lib/pkp/classes/template/PKPTemplateManager.php(161): APP\core\Request->getContext()
#12 /home/public_html/panoply/classes/template/TemplateManager.php(40): PKP\template\PKPTemplateManager->initialize(Object(APP\core\Request))
#13 /home/public_html/panoply/lib/pkp/classes/template/PKPTemplateManager.php(1394): APP\template\TemplateManager->initialize(Object(APP\core\Request))
#14 /home/public_html/panoply/lib/pkp/classes/plugins/Plugin.php(403): PKP\template\PKPTemplateManager::getManager(Object(APP\core\Request))
#15 /home/public_html/panoply/lib/pkp/classes/plugins/Plugin.php(137): PKP\plugins\Plugin->_registerTemplateResource()
#16 /home/public_html/panoply/lib/pkp/classes/plugins/LazyLoadPlugin.php(34): PKP\plugins\Plugin->register('generic', 'plugins/generic...', NULL)
#17 /home/public_html/panoply/plugins/generic/announcementFeed/AnnouncementFeedPlugin.php(35): PKP\plugins\LazyLoadPlugin->register('generic', 'plugins/generic...', NULL)
#18 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(76): APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin->register('generic', 'plugins/generic...', NULL)
#19 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(121): PKP\plugins\PluginRegistry::register('generic', Object(APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin), 'plugins/generic...', NULL)
#20 [internal function]: PKP\plugins\PluginRegistry::PKP\plugins\{closure}(Object(APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin), 'plugins/generic...')
#21 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(121): array_walk_recursive(Array, Object(Closure))
#22 /home/public_html/panoply/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory('generic', true)
#23 /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php(373): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#24 /home/public_html/panoply/index.php(21): PKP\core\PKPApplication->execute()
#25 {main}

Next Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rodoslov_ojs.journals' doesn't exist (SQL: SELECT * FROM journals WHERE path = journal) in /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
Stack trace:
#0 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback('SELECT * FROM j...', Array, Object(Closure))
#1 /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(456): Illuminate\Database\Connection->run('SELECT * FROM j...', Array, Object(Closure))
#2 [internal function]: Illuminate\Database\Connection->cursor('SELECT * FROM j...', Array)
#3 /home/public_html/panoply/lib/pkp/classes/context/ContextDAO.php(99): Generator->current()
#4 /home/public_html/panoply/lib/pkp/classes/core/PKPRouter.php(194): PKP\context\ContextDAO->getByPath('journal')
#5 [internal function]: PKP\core\PKPRouter->getContext(Object(APP\core\Request))
#6 /home/public_html/panoply/lib/pkp/classes/core/PKPRequest.php(861): call_user_func_array(Array, Array)
#7 /home/public_html/panoply/lib/pkp/classes/core/PKPRequest.php(753): PKP\core\PKPRequest->_delegateToRouter('getContext')
#8 /home/public_html/panoply/classes/core/Request.php(41): PKP\core\PKPRequest->getContext()
#9 /home/public_html/panoply/lib/pkp/classes/template/PKPTemplateManager.php(161): APP\core\Request->getContext()
#10 /home/public_html/panoply/classes/template/TemplateManager.php(40): PKP\template\PKPTemplateManager->initialize(Object(APP\core\Request))
#11 /home/public_html/panoply/lib/pkp/classes/template/PKPTemplateManager.php(1394): APP\template\TemplateManager->initialize(Object(APP\core\Request))
#12 /home/public_html/panoply/lib/pkp/classes/plugins/Plugin.php(403): PKP\template\PKPTemplateManager::getManager(Object(APP\core\Request))
#13 /home/public_html/panoply/lib/pkp/classes/plugins/Plugin.php(137): PKP\plugins\Plugin->_registerTemplateResource()
#14 /home/public_html/panoply/lib/pkp/classes/plugins/LazyLoadPlugin.php(34): PKP\plugins\Plugin->register('generic', 'plugins/generic...', NULL)
#15 /home/public_html/panoply/plugins/generic/announcementFeed/AnnouncementFeedPlugin.php(35): PKP\plugins\LazyLoadPlugin->register('generic', 'plugins/generic...', NULL)
#16 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(76): APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin->register('generic', 'plugins/generic...', NULL)
#17 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(121): PKP\plugins\PluginRegistry::register('generic', Object(APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin), 'plugins/generic...', NULL)
#18 [internal function]: PKP\plugins\PluginRegistry::PKP\plugins\{closure}(Object(APP\plugins\generic\announcementFeed\AnnouncementFeedPlugin), 'plugins/generic...')
#19 /home/public_html/panoply/lib/pkp/classes/plugins/PluginRegistry.php(121): array_walk_recursive(Array, Object(Closure))
#20 /home/public_html/panoply/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory('generic', true)
#21 /home/public_html/panoply/lib/pkp/classes/core/PKPApplication.php(373): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#22 /home/public_html/panoply/index.php(21): PKP\core\PKPApplication->execute()
#23 {main}
  thrown in /home/public_html/panoply/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 760
[21-Jun-2023 12:24:29 UTC] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `metrics_submission_geo_daily` add unique `msgd_uc_load_context_submission_c_r_c_date`(`load_id`, `context_id`, `submission_id`, `country`, `region`, `city`, `date`))

I have the same problem, I would appreciate help, I am installing OMP 3.3 and I get the same error in the installation process.

As per my knowledge you have mixed up some old or new files rest, I am looking onto it trying to provide solution

Much appreciated.
I don’t see how. I downloaded the file from the server. Unzipped it on mine and changed the config file. Before that I removed everything. I am trying on a different location now as well but I get the same results. I had a previous version installed and 3.3 and tried to upgrade it but that didnt work, so that is why I am trying a clean install.

Alright, took a different box on the server. Complete new database and file structure to make sure there is nothing I missed. Followed install instructions, I enter at the install screen. No warnings from the install screen before I put in the database info etc.

I keep getting this error that kicks me back to the first install page

[22-Jun-2023 05:41:18 UTC] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `metrics_submission_geo_daily` add unique `msgd_uc_load_context_submission_c_r_c_date`(`load_id`, `context_id`, `submission_id`, `country`, `region`, `city`, `date`))

Now this is the only error message I see.
I run a dedicated server, other than this error message the log is clean. No other quirks of any kind.

Anyone any idea how to get resolve this?