• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Fatal error [400]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key

Status
Not open for further replies.

ss132203

Chevereto Member
In two of my sites I'm having these errors

Fatal error [400]:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
Triggered in /app/lib/classes/class.requestlog.php at line 47

Stack trace:
#0 /app/routes/route.login.php(121): CHV\Requestlog::insert(Array)
#1 /lib/G/classes/class.handler.php(216): G\Handler->{closure}(G\Handler)
#2 /lib/G/classes/class.handler.php(120): G\Handler->processRequest()
#3 /app/loader.php(479): G\Handler->__construct(Array)
#4 /index.php(20): include_once('/app/loader.php')

other site

Fatal error [400]:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
Triggered in /app/lib/classes/class.requestlog.php at line 47

Stack trace:
#0 /app/routes/route.login.php(132): CHV\Requestlog::insert(Array)
#1 /lib/G/classes/class.handler.php(216): G\Handler->{closure}(G\Handler)
#2 /lib/G/classes/class.handler.php(120): G\Handler->processRequest()
#3 /app/loader.php(422): G\Handler->__construct(Array)
#4 /index.php(20): include_once('/app/loader.php')

server was rebooted unexpectedly had chev internal error couldn't fix it so installed plesk again, copied all two sites data, all working fine but when i upload image no image is uploaded.

then i logged out and logged in "chev internal error" i was facing

i changed debug level to 3 and had those errors i pasted above
 
Last edited:
Just truncate the request log table and you should be fine.
 
Problem was that chv_requests.request_id didn't have AUTO_INCREMENT. The only possible way to cause this problem is altering the table structure, try to be more careful when editing your database structure.

Fixed.
 
Status
Not open for further replies.
Back
Top