Table 'omeka.omeka_options' doesn't exist

Hi there.

I’m trying to setup an Omeka instance on my local computer.

I’ve used XAMPP to creare a webserver, then created a database with a user with complete access. But, when I try launchin Omeka configuration, I receive the following:

mysqli_sql_exception

Table 'omeka.omeka_options' doesn't exist

mysqli_sql_exception: Table 'omeka.omeka_options' doesn't exist in C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Statement\Mysqli.php:70 Stack trace: #0
C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Statement\Mysqli.php(70): mysqli->prepare('SELECT name, va...') #1
C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT name, va...') #2
C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Adapter\Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT name, va...') #3
C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT name, va...') #4
C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Adapter\Abstract.php(811): Zend_Db_Adapter_Abstract->query('SELECT name, va...', Array) #5
C:\xampp\htdocs\omeka\application\libraries\Omeka\Db.php(80): Zend_Db_Adapter_Abstract->fetchPairs('SELECT name, va...') #6
C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Options.php(33): Omeka_Db->__call('fetchPairs', Array) #7 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Options->init() #8 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(641): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('Options') #9 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('Options') #10 
C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Pluginbroker.php(25): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap('Options') #11
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Pluginbroker->init() #12 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(641): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('PluginBroker') #13
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('PluginBroker') #14 
C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Frontcontroller.php(59): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap('PluginBroker') #15 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Frontcontroller->init() #16
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('frontcontroller') #17 
C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('frontcontroller') #18
C:\xampp\htdocs\omeka\application\libraries\Zend\Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #19 
C:\xampp\htdocs\omeka\application\libraries\Omeka\Application.php(49): Zend_Application->bootstrap() #20
C:\xampp\htdocs\omeka\index.php(23): Omeka_Application->initialize() #21
{main}

I thought the issue was coming from the db engine (XAMPP defaults to InnoDB), but after setting the mysql config file to use MyISAM instead and restarting the server nothing has changed.

Has anybody come across the same issue, or can offer me a solution?

Thanks.

Omeka Classic installs (almost) all its tables as InnoDB anyway so that shouldn’t be the issue.

The odd thing is that “omeka_options doesn’t exist” is generally the indicator to the system that it should redirect to the installer, so you typically don’t see this error. I think maybe the relevant factor is that mysqli threw an exception here instead of what it normally does, report the error through its own internal system.

The Zend Framework database code we use doesn’t expect mysqli to throw exceptions, so it causes some issues. Looking into it, it looks like maybe this is a problem specific to PHP 8.1, which changes the default error-reporting mode of mysqli. Are you using PHP 8.1 there?

A fix for this issue when running under PHP 8.1 is now among the many PHP 8.1-specific fixes slated for release in the next version of Omeka Classic.

After implementing the fix, the installation run smoothly and was completed, thanks.

However, if I now try to visit either the public or the admin side, there’s a new issue:

Omeka has encountered an error

Zend_Session_Exception

Zend_Session::start() - C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Table\Rowset\Abstract.php(Line:368): Error #8192 Return type of Zend_Db_Table_Rowset_Abstract::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Zend_Session_Exception: Zend_Session::start() - C:\xampp\htdocs\omeka\application\libraries\Zend\Db\Table\Rowset\Abstract.php(Line:368): Error #8192 Return type of Zend_Db_Table_Rowset_Abstract::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\omeka\application\libraries\Zend\Session.php:509

Stack trace:
#0 C:\xampp\htdocs\omeka\application\libraries\Zend\Session\Namespace.php(143): Zend_Session::start(true)
#1 C:\xampp\htdocs\omeka\application\libraries\Zend\Auth\Storage\Session.php(86): Zend_Session_Namespace->__construct('Zend_Auth')
#2 C:\xampp\htdocs\omeka\application\libraries\Zend\Auth.php(91): Zend_Auth_Storage_Session->__construct()
#3 C:\xampp\htdocs\omeka\application\libraries\Zend\Auth.php(141): Zend_Auth->getStorage()
#4 C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Currentuser.php(42): Zend_Auth->hasIdentity()
#5 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Currentuser->init()
#6 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(641): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('Currentuser')
#7 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('Currentuser')
#8 C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Helpers.php(116): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap('Currentuser')
#9 C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Helpers.php(27): Omeka_Application_Resource_Helpers->_initAclHelper()
#10 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Helpers->init()
#11 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(641): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('Helpers')
#12 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('Helpers')
#13 C:\xampp\htdocs\omeka\application\libraries\Omeka\Application\Resource\Frontcontroller.php(63): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap('Helpers')
#14 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Frontcontroller->init()
#15 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('frontcontroller')
#16 C:\xampp\htdocs\omeka\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('frontcontroller')
#17 C:\xampp\htdocs\omeka\application\libraries\Zend\Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
#18 C:\xampp\htdocs\omeka\application\libraries\Omeka\Application.php(49): Zend_Application->bootstrap()
#19 C:\xampp\htdocs\omeka\index.php(23): Omeka_Application->initialize()
#20 {main}

PHP version is 8.1.6

This is something that’s also fixed in the upcoming version: there are many PHP 8.1 incompatibilities it addresses.

Generally PHP 8.1 things are in the realm of warnings, and when they cause problems, just turning off error display (“development” mode) will allow things to work even without fixes to the code. Though I think in this case, the Zend code is catching this warning from the session component and treating it as an error, so turning off error display isn’t effective here.

Switching to PHP 8.0 or older is the simplest solution. Running the Github “master” branch code will also resolve the issue but you might not find that an appropriate option.

I went for the GitHub master version in the end, and so far it seems to be working. Thanks, @jflatnes

This will come handy also for an extra test :wink:

I suggest that you
goto: Omeka | TurnKey GNU/Linux

download the .iso file

flash it to a thumdrive or cd

boot your computer with that flashed device.

when you boot ,the options are:
run it totally in memory or
install it to your computer or
run the. iso in a virtual machine.