Closed robertne13 closed 1 month ago
and table mod_pvewhmcs add id=1 config=null vnc_secret=null debug_mode= 0
Hello - getting the Same error, did you found a solution?
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY' in /var/www/vendor/illuminate/database/Connection.php:464
Stack trace:
#0 /var/www/vendor/illuminate/database/Connection.php(464): PDOStatement->execute()
#1 /var/www/vendor/illuminate/database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /var/www/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback()
#3 /var/www/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run()
#4 /var/www/vendor/illuminate/database/Capsule/Manager.php(200): Illuminate\Database\Connection->statement()
#5 /var/www/modules/addons/pvewhmcs/pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic()
#6 /var/www/admin/configaddonmods.php(0): pvewhmcs_activate()
#7 {main}
Next Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY' (SQL:
INSERT INTO `mod_pvewhmcs` (`id`, `config`, `vnc_secret`) VALUES (1, NULL, NULL);) in /var/www/vendor/illuminate/database/Connection.php:671
Stack trace:
#0 /var/www/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback()
#1 /var/www/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run()
#2 /var/www/vendor/illuminate/database/Capsule/Manager.php(200): Illuminate\Database\Connection->statement()
#3 /var/www/modules/addons/pvewhmcs/pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic()
#4 /var/www/admin/configaddonmods.php(0): pvewhmcs_activate()
#5 {main}
Checking here - did you download the SQL file from the repo main? Per the note on the release:
https://github.com/The-Network-Crew/Proxmox-VE-for-WHMCS/releases/tag/v1.2.4
ie. The packaged version contains a buggy version of the db.sql file.
Oh - didn't see that okay thanks - where do i get the SQL file and import it...?
File: https://github.com/The-Network-Crew/Proxmox-VE-for-WHMCS/raw/master/modules/addons/pvewhmcs/db.sql
If you are not installing, and instead are upgrading, then instead you just need to run the update statements:
https://github.com/The-Network-Crew/Proxmox-VE-for-WHMCS/blob/master/UPDATE-SQL.md
i have the same problem, but with the db.sql its not working then he says Duplicate entry '1' for key 'PRIMARY'
But it was only like that when I installed only 1.2.4, I was able to work around this by starting with 1.2.2, then going to 1.2.3, then using the update sql, and then going to 1.2.4. unfortunately a bit cumbersome.
The db.sql file has the same insert for mod_pvewhmcs table in v1.2.2 as v1.2.4
Closing as this should all be resolved via repo file as above, and shortly via v1.2.5 bug fix release :-)
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY' in /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php:464 Stack trace:
0 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(464): PDOStatement->execute()
1 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}('\nINSERT INTO `m...', Array)
2 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('\nINSERT INTO `m...', Array, Object(Closure))
3 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run('\nINSERT INTO `m...', Array, Object(Closure))
4 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Capsule/Manager.php(200): Illuminate\Database\Connection->statement('\nINSERT INTO `m...')
5 /home/apoloclo/my.apolocloud.net/modules/addons/pvewhmcs/pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic('statement', Array)
6 /home/apoloclo/my.apolocloud.net/admin/configaddonmods.php(0): pvewhmcs_activate()
7 {main}
Next Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY' (SQL: INSERT INTO
mod_pvewhmcs
(id
,config
,vnc_secret
) VALUES (1, NULL, NULL);) in /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php:671 Stack trace:0 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('\nINSERT INTO `m...', Array, Object(Closure))
1 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run('\nINSERT INTO `m...', Array, Object(Closure))
2 /home/apoloclo/my.apolocloud.net/vendor/illuminate/database/Capsule/Manager.php(200): Illuminate\Database\Connection->statement('\nINSERT INTO `m...')
3 /home/apoloclo/my.apolocloud.net/modules/addons/pvewhmcs/pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic('statement', Array)
4 /home/apoloclo/my.apolocloud.net/admin/configaddonmods.php(0): pvewhmcs_activate()
5 {main}