Syntax error or access violation error while deploying the application #2410

Closed
opened 2026-02-05 03:59:25 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @AVA-Srini on GitHub (Oct 4, 2021).

I was trying to deploy the application in windows server 2016, all my services in wamp server is running but i am getting this error while running the command php artisan migrate

I referred this YouTube video and Manual installation process

YouTube video: https://www.youtube.com/watch?v=lSaY4lK_RjM

Manual installation instructions : https://www.bookstackapp.com/docs/admin/installation/

Any help on this is greatly appreciated, Thanks in advance!

Error:
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table joint_permissions add primary key joint_primary(role_id, entity_type, entity_id, action))

at C:\Applications\BookStack-master\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {

669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")
C:\Applications\BookStack-master\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18

2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
C:\Applications\BookStack-master\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:119

Please use the argument -v to see more details.

image

Originally created by @AVA-Srini on GitHub (Oct 4, 2021). I was trying to deploy the application in windows server 2016, all my services in wamp server is running but i am getting this error while running the command php artisan migrate I referred this YouTube video and Manual installation process YouTube video: https://www.youtube.com/watch?v=lSaY4lK_RjM Manual installation instructions : https://www.bookstackapp.com/docs/admin/installation/ Any help on this is greatly appreciated, Thanks in advance! Error: Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `joint_permissions` add primary key `joint_primary`(`role_id`, `entity_type`, `entity_id`, `action`)) at C:\Applications\BookStack-master\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) { > 669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673| Exception trace: 1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes") C:\Applications\BookStack-master\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18 2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException)) C:\Applications\BookStack-master\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:119 Please use the argument -v to see more details. ![image](https://user-images.githubusercontent.com/91877639/135832258-8ab97448-84d6-4249-8ba5-7e9f0285c664.png)
OVERLORD added the 🐕 Support label 2026-02-05 03:59:25 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 4, 2021):

Hi @AVA-Srini,
It sounds like the same issue as reported in #2939.
Please see my latter comment there for guidance on this.

Note, I don't think WAMP is really considered production ready for PHP/Windows hosting (Although I may be misguided). I think it's primarily for development. I think more production focused setups would host a PHP site via IIS.

@ssddanbrown commented on GitHub (Oct 4, 2021): Hi @AVA-Srini, It sounds like the same issue as reported in #2939. Please see [my latter comment there](https://github.com/BookStackApp/BookStack/issues/2939#issuecomment-930156973) for guidance on this. Note, I don't think WAMP is really considered production ready for PHP/Windows hosting (Although I may be misguided). I think it's primarily for development. I think more production focused setups would host a PHP site via IIS.
Author
Owner

@AVA-Srini commented on GitHub (Oct 4, 2021):

Hi @ssddanbrown thanks for the info, I tried installing the same in CentOS8, i got no errors in the installation/resolved the errors occurred whiled installation

Faced Issues #1: MariaDB password is set to random value while using the scripts
Resolution : reset the MariaDB value, use this link as reference: https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

Faced Issue #2: module tidy was not found
Resolution: we can install tidy by using the command : yum install php-tidy

I tried installing through script provided for centos8 but faced a number of errors, then switched to installing manually in centos8

I was enable to install the bookstack but when I enter the IP address of the application, the webpage loads but i am unable to use the application meaning that the application is not hosted properly

Any help would be greatly appreciated!

Thanks in advance!

image

image

image

image

@AVA-Srini commented on GitHub (Oct 4, 2021): Hi @ssddanbrown thanks for the info, I tried installing the same in CentOS8, i got no errors in the installation/resolved the errors occurred whiled installation Faced Issues #1: MariaDB password is set to random value while using the scripts Resolution : reset the MariaDB value, use this link as reference: [https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password](url) Faced Issue #2: module tidy was not found Resolution: we can install tidy by using the command : yum install php-tidy I tried installing through script provided for centos8 but faced a number of errors, then switched to installing manually in centos8 I was enable to install the bookstack but when I enter the IP address of the application, the webpage loads but i am unable to use the application meaning that the application is not hosted properly Any help would be greatly appreciated! Thanks in advance! ![image](https://user-images.githubusercontent.com/91877639/135892642-c9a889b0-63c1-49de-b1a5-8f3f36cda0e3.png) ![image](https://user-images.githubusercontent.com/91877639/135892731-43cfdd4b-050f-4a43-99ac-73e8bffb119b.png) ![image](https://user-images.githubusercontent.com/91877639/135892865-17de2ade-016e-47cc-ab3f-461397ba3f08.png) ![image](https://user-images.githubusercontent.com/91877639/135895090-c77c40c1-c04d-4dca-aa91-5e053dcfbf4c.png)
Author
Owner

@AVA-Srini commented on GitHub (Oct 4, 2021):

Tried installing the application through docker and it works! so closing this page

Special thanks to @ssddanbrown for the application and the support 👍

Great work bud!

Reference video: https://www.youtube.com/watch?v=VQj5kg7orAM

@AVA-Srini commented on GitHub (Oct 4, 2021): Tried installing the application through docker and it works! so closing this page Special thanks to @ssddanbrown for the application and the support 👍 Great work bud! Reference video: https://www.youtube.com/watch?v=VQj5kg7orAM
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2410