DB Failure in Installation of pimcore 4.4.1 in combination with PHP 7

286 views Asked by At

I just wanted to try the new version of pimcore. As I have a test server already installed with php7 for other porpose I wanted to install pimcore there as well.

Unfortunately I got an error during the installation process

Failed: 
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes in /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #2 /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('\nCREATE TABLE `...', Array) #4 [internal function]: Zend_Db_Adapter_Pdo_Abstract->query('\nCREATE TABLE `...') #5 /var/www/pimcore/pimcore/lib/Pimcore/Db/Wrapper.php(291): call_user_func_array(Array, Array) #6 /var/www/pimcore/pimcore/lib/Pimcore/Db/Wrapp in /var/www/pimcore/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php on line 235

Not sure if this is really an issue with php7, but I thought worth to mention.

I think it's aDB issue as described in the error message. Seems that there is a try to set an index on an field which is bigger than 1000 bytes. What's surprising me as this is the limit for MyISAM and as I can see everything is InnoDB. By the way I'm using a Percona 5.7, not a MySQL standard Engine, but thats usually transparent.

If I fire the Form again, then everything seems to be fine, but isn't. A lot of tables are missing in the DB and Login isn't possible. Last table created in the DB is the cache table. Maybe you can have a look.

cheers Kirsten

1

There are 1 answers

0
Bbak On

It's not a PHP issue. I had this error quite a while ago when I was playing around with Charset settings in my create database statements.

Since sticking to the default solved my issue, I've no definitive answer, but you can try & error using different create database statements and applying Pimcore 4.4.3 (!) initial SQL-Script through MySQL Workbench or whatever UI you a using.

Note: We're also using the Percona binaries.