I have successfully installed Omeka. Everything works correctly but I have a problem with the rest API. I decided to test a javascript client from:
https://github.com/jimsafley/omeka-client-js
There are 3 fields in this client: endepoint, key, item id. We use them to save a file in a database. In my case I fill them like below:
endepoint: http://my-host/omeka-2.2.2/omeka-2.2.2/api
key:f8f0baa1cd8991b5bdad05d74966604b6c4e0a35
item id: 1.
Everything is is beautiful but I always get 500 internal server error :(. The problem appears when I use api key(POST, PUT, DELETE).
Zend_Db_Statement_Mysqli_Exception
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'keys WHEREkey
= ?' at line 1#0 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Db\Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT * FROM k...')
#1 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Db\Adapter\Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT * FROM k...')
#2 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT * FROM k...')
#3 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Db\Adapter\Abstract.php(756): Zend_Db_Adapter_Abstract->query('SELECT * FROM k...', Array)
#4 [internal function]: Zend_Db_Adapter_Abstract->fetchRow('SELECT * FROM k...', Array)
#5 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Db.php(79): call_user_func_array(Array, Array)
#6 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Db\Table.php(670): Omeka_Db->__call('fetchRow', Array)
#7 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Db\Table.php(670): Omeka_Db->fetchRow('SELECT * FROM k...', Array)
#8 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Auth\Adapter\KeyTable.php(39): Omeka_Db_Table->fetchObject('SELECT * FROM k...', Array)
#9 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Auth.php(117): Omeka_Auth_Adapter_KeyTable->authenticate()
#10 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Application\Resource\Currentuser.php(39): Zend_Auth->authenticate(Object(Omeka_Auth_Adapter_KeyTable))
#11 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(695): Omeka_Application_Resource_Currentuser->init()
#12 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('currentuser')
#13 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL)
#14 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Zend\Application.php(355): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
#15 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\application\libraries\Omeka\Application.php(51): Zend_Application->bootstrap()
#16 C:\xampp\htdocs\omeka-2.2.2\omeka-2.2.2\index.php(23): Omeka_Application->initialize()
#17 {main}
If you have any ideas how to solve this problem I would be very grateful.