Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database error #79

Closed
robertne13 opened this issue Jun 19, 2024 · 8 comments
Closed

database error #79

robertne13 opened this issue Jun 19, 2024 · 8 comments
Milestone

Comments

@robertne13
Copy link

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}

@robertne13
Copy link
Author

and table mod_pvewhmcs add id=1 config=null vnc_secret=null debug_mode= 0

@ferrixx
Copy link

ferrixx commented Jul 31, 2024

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}

@lsthompson
Copy link
Member

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.

@ferrixx
Copy link

ferrixx commented Aug 1, 2024

Oh - didn't see that okay thanks - where do i get the SQL file and import it...?

@lsthompson
Copy link
Member

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

@medaria
Copy link

medaria commented Aug 20, 2024

i have the same problem, but with the db.sql its not working then he says
Duplicate entry '1' for key 'PRIMARY'

@medaria
Copy link

medaria commented Aug 20, 2024

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.

lsthompson added a commit that referenced this issue Aug 22, 2024
@lsthompson lsthompson added this to the v1.2.5 milestone Aug 22, 2024
@lsthompson
Copy link
Member

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants