# NC 11: Error using PHP7

**URL:** <https://help.nextcloud.com/t/nc-11-error-using-php7/6383>\
**Category:** ℹ️ Support\
**Created:** [December 18, 2016, 9:32am UTC](https://help.nextcloud.com/t/nc-11-error-using-php7/6383 "2016-12-18T09:32:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vCentre](https://help.nextcloud.com/letter_avatar/vcentre/32/6_22734026db12803ebb3e059622ac3534.png) [@vCentre](https://help.nextcloud.com/u/vCentre)\
**Post date:** [December 18, 2016, 10:35am UTC](https://help.nextcloud.com/t/nc-11-error-using-php7/6383/3 "2016-12-18T10:35:38Z")

</div>

Looks like v11 is not stable yet, below there are too many concerns with PHP7; sql driver is ok  
v10.0.02 is doing fine with PHP7, as per others v11 is doing fine with PHP5.6 which means that, v11 is not ready yet for PHP7.

Look at the below reported behavior,

> [@Libreoffice Nextcloud - Access Forbidden Issue](https://help.nextcloud.com/t/libreoffice-nextcloud-access-forbidden-issue/6358):
>
> Only with v11.0.0 the below issue encountered Ubuntu 14.04 x64, MariaDB v10 and PHP v7 The same in both scenarios, fresh install and upgrade from v10.0.2 Data directory is set to /home/nextcloud/data with the appropriate permissions The above directoy where included in apache settings \<Directory /home/nextcloud/data/\> Options Indexes FollowSymLinks AllowOverride All Require all granted and yet issue exist, please advice on error source

> Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing ‘INSERT INTO `oc_file_locks` (`key`,`lock`,`ttl`) SELECT ?,?,? FROM `oc_file_locks` WHERE `key` = ? HAVING COUNT(\*) = 0’ with params [“files/c0abc2205a08c7226c40f51b4b8c045c”, -1, 1482017777, “files/c0abc2205a08c7226c40f51b4b8c045c”]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘files/c0abc2205a08c7226c40f51b4b8c045c’ for key ‘lock\_key\_index’  
> /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractMySQLDriver-\>convertException(‘An exception oc…’, Object(Doctrine\DBAL\Driver\PDOException))  
> /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 996: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), ‘INSERT INTO `oc...', Array) /var/www/html/nextcloud/lib/private/DB/Connection.php - line 215: Doctrine\DBAL\Connection->executeUpdate('INSERT INTO `oc…’, Array, Array)  
> /var/www/html/nextcloud/lib/private/DB/Adapter.php - line 114: OC\DB\Connection-\>executeUpdate(‘INSERT INTO `oc…’, Array)  
> /var/www/html/nextcloud/lib/private/DB/Connection.php - line 253: OC\DB\Adapter-\>insertIfNotExist(‘_PREFIX_file\_lo…’, Array, Array)  
> /var/www/html/nextcloud/lib/private/Lock/DBLockingProvider.php - line 118: OC\DB\Connection-\>insertIfNotExist(‘_PREFIX_file\_lo…’, Array, Array)  
> /var/www/html/nextcloud/lib/private/Lock/DBLockingProvider.php - line 178: OC\Lock\DBLockingProvider-\>initLockField(‘files/c0abc2205…’, -1)  
> /var/www/html/nextcloud/lib/private/Files/Storage/Common.php - line 680: OC\Lock\DBLockingProvider-\>acquireLock(‘files/c0abc2205…’, 2)  
> /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 588: OC\Files\Storage\Common-\>acquireLock(‘scanner appdat…’, 2, Object(OC\Lock\DBLockingProvider))  
> /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 588: OC\Files\Storage\Wrapper\Wrapper-\>acquireLock(‘scanner appdat…’, 2, Object(OC\Lock\DBLockingProvider))  
> /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 316: OC\Files\Storage\Wrapper\Wrapper-\>acquireLock(‘scanner appdat…’, 2, Object(OC\Lock\DBLockingProvider))  
> /var/www/html/nextcloud/lib/private/Files/View.php - line 1301: OC\Files\Cache\Scanner-\>scan(‘appdata\_oc77ydd…’, false)  
> /var/www/html/nextcloud/lib/private/Files/View.php - line 1342: OC\Files\View-\>getCacheEntry(Object(OCA\Files\_Trashbin\Storage), ‘appdata\_oc77ydd…’, ‘/appdata\_oc77yd…’)  
> /var/www/html/nextcloud/lib/private/Files/Node/Root.php - line 196: OC\Files\View-\>getFileInfo(‘/appdata\_oc77yd…’)  
> /var/www/html/nextcloud/lib/private/Files/Node/Folder.php - line 122: OC\Files\Node\Root-\>get(‘/appdata\_oc77yd…’)  
> /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php - line 89: OC\Files\Node\Folder-\>get(‘theming’)  
> /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php - line 105: OC\Files\AppData\AppData-\>getAppDataFolder()  
> /var/www/html/nextcloud/apps/theming/lib/ImageManager.php - line 62: OC\Files\AppData\AppData-\>getFolder(‘0’)  
> /var/www/html/nextcloud/apps/theming/lib/ImageManager.php - line 78: OCA\Theming\ImageManager-\>getCacheFolder()  
> /var/www/html/nextcloud/apps/theming/lib/Controller/IconController.php - line 94: OCA\Theming\ImageManager-\>getCachedImage(‘icon-core-filet…’)  
> [internal function] OCA\Theming\Controller\IconController-\>getThemedIcon(‘core’, ‘filetypes/folde…’)  
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call\_user\_func\_array(Array, Array)  
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher-\>executeController(Object(OCA\Theming\Controller\IconController), ‘getThemedIcon’)  
> /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher-\>dispatch(Object(OCA\Theming\Controller\IconController), ‘getThemedIcon’)  
> /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main(‘OCA\Theming\Con…’, ‘getThemedIcon’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)  
> [internal function] OC\AppFramework\Routing\RouteActionHandler-\>\_\_invoke(Array)  
> /var/www/html/nextcloud/lib/private/Route/Router.php - line 299: call\_user\_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)  
> /var/www/html/nextcloud/lib/base.php - line 1010: OC\Route\Router-\>match(‘/apps/theming/i…’)  
> /var/www/html/nextcloud/index.php - line 40: OC handleRequest()  
> {main}

AND

> Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN (‘d41d8cd98f00b204e9800998ecf8427e’, ‘0408b6d83c754dd91352ec76b9476660’, ‘dc105a434443413656cda016551f8145’, ‘1336ef2e36a0460cdaf958996f1fda50’))’ with params [1482014239, “5855be1f571a9”, 3]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction  
> /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractMySQLDriver-\>convertException(‘An exception oc…’, Object(Doctrine\DBAL\Driver\PDOException))  
> /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 996: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), ‘UPDATE `oc_file...', Array) /var/www/html/nextcloud/lib/private/DB/Connection.php - line 215: Doctrine\DBAL\Connection->executeUpdate('UPDATE `oc\_file…’, Array, Array)  
> /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 208: OC\DB\Connection-\>executeUpdate(‘UPDATE `oc\_file…’, Array, Array)  
> /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 177: Doctrine\DBAL\Query\QueryBuilder-\>execute()  
> /var/www/html/nextcloud/lib/private/Files/Cache/Propagator.php - line 88: OC\DB\QueryBuilder\QueryBuilder-\>execute()  
> /var/www/html/nextcloud/lib/private/Files/Cache/Updater.php - line 138: OC\Files\Cache\Propagator-\>propagateChange(‘appdata\_oc77ydd…’, 1482014239, 0)  
> /var/www/html/nextcloud/lib/private/Files/View.php - line 318: OC\Files\Cache\Updater-\>update(‘appdata\_oc77ydd…’, 1482014239)  
> /var/www/html/nextcloud/lib/private/Files/View.php - line 1142: OC\Files\View-\>writeUpdate(Object(OCA\Files\_Trashbin\Storage), ‘appdata\_oc77ydd…’, 1482014239)  
> /var/www/html/nextcloud/lib/private/Files/View.php - line 556: OC\Files\View-\>basicOperation(‘touch’, ‘/appdata\_oc77yd…’, Array, NULL)  
> /var/www/html/nextcloud/lib/private/Files/Node/Folder.php - line 170: OC\Files\View-\>touch(‘/appdata\_oc77yd…’)  
> /var/www/html/nextcloud/lib/private/Files/SimpleFS/SimpleFolder.php - line 83: OC\Files\Node\Folder-\>newFile(‘icon-core-filet…’)  
> /var/www/html/nextcloud/apps/theming/lib/ImageManager.php - line 94: OC\Files\SimpleFS\SimpleFolder-\>newFile(‘icon-core-filet…’)  
> /var/www/html/nextcloud/apps/theming/lib/Controller/IconController.php - line 100: OCA\Theming\ImageManager-\>setCachedImage(‘icon-core-filet…’, ‘\<svg xmlns="htt…’)  
> [internal function] OCA\Theming\Controller\IconController-\>getThemedIcon(‘core’, ‘filetypes/text…’)  
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call\_user\_func\_array(Array, Array)  
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher-\>executeController(Object(OCA\Theming\Controller\IconController), ‘getThemedIcon’)  
> /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher-\>dispatch(Object(OCA\Theming\Controller\IconController), ‘getThemedIcon’)  
> /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main(‘OCA\Theming\Con…’, ‘getThemedIcon’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)  
> [internal function] OC\AppFramework\Routing\RouteActionHandler-\>\_\_invoke(Array)  
> /var/www/html/nextcloud/lib/private/Route/Router.php - line 299: call\_user\_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)  
> /var/www/html/nextcloud/lib/base.php - line 1010: OC\Route\Router-\>match(‘/apps/theming/i…’)  
> /var/www/html/nextcloud/index.php - line 40: OC handleRequest()  
> {main}

---

_[View the full topic](https://help.nextcloud.com/t/nc-11-error-using-php7/6383)._
