admin login screen seems to redirect on itself

fresh install of 1.5.2, new database

Everything installs fine but when trying to login with admin credentials it just seems to reload the page and do nothing. An incorrect password generates an error message, so the admin name and password are correct. Public side works ok. Seems to be .htaccess or mod_rewrite problem, but I'm not sure why.

I've tried lots and lots of tweaking .htaccess and httpd.conf rewrite rules with no luck.

running SUSE Linux Enterprise

Is it possible you have cookies disabled in your browser, or the login cookie is not being saved?

Do you see the same problems with different browsers?

Checked the error logs and this is what I see generated after attempting login, where /my/path/ is a real internal server path. Any ideas?

PHP Fatal error: Uncaught exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry 'm4bn5a6qs27b5em6dn0crl337qagg0ip' for key 1' in /my/path/omeka-1.5.2/application/libraries/Zend/Db/Statement/Mysqli.php:214\nStack trace:\n#0 /my/path/omeka-1.5.2/application/libraries/Zend/Db/Statement.php(300): Zend_Db_Statement_Mysqli->_execute(Array)\n#1 /my/path/omeka-1.5.2/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)\n#2 /my/path/omeka-1.5.2/application/libraries/Zend/Db/Adapter/Abstract.php(575): Zend_Db_Adapter_Abstract->query('INSERT INTO `se...', Array)\n#3 /local/vol00/srv/www/htdocs/omeka-1.5.2/application/libraries/Zend/Db/Table/Abstract.php(1075): Zend_Db_Adapter_Abstract->insert('sessions', Array)\n#4 /my/path/omeka-1.5.2/application/libraries/Zend/Session/SaveHandler/DbTable.php(356): Zend_Db_Table_Abstract->insert(Array)\n#5 [internal function in /my/path/omeka-1.5.2/application/libraries/Zend/Db/Statement/Mysqli.php on line 214, referer: myURL/omeka/admin/users/login

This is probably the cause of your issue, but it's a weird problem.

MySQL is reporting that your session ID is already stored in the database, but if that was actually the case, Zend should have been trying to update that entry, not create a new one.

It seems like your "sessions" table might be somehow corrupted. Repairing and/or truncating it with your MySQL client of choice might be necessary.

I'm at a total loss. I've truncated the table and dropped the entire database many times now. I've even completely reinstalled Omeka once with no luck. It happens on different browsers and different computers.

Everytime I attempt a login with the admin credentials it creates a new record in the session table. The 'lifetime' field is always the same value, FWIW.

Would our SSL certificate have anything to do with this? I've tried loading admin screen from both http and https. My problems seems to be related to this very old issue:

But paths.php seems correct and I don't know what to modify.

Can you check what the value of your PHP setting session.hash_function is?

It's possible that your server is generating session ID's that are longer than Omeka is expecting.

If you're still seeing those exceptions logged, I'd say it's almost certain to be a different issue than the one in that old topic you linked to.

It is currently set to sha256


session.hash_bits_per_character = 5

That was it! I changed session.hash_function in php.ini to md5 and it completely fixed the problem. No zend error and I can log into admin.