Firefox PHP

Fatal error in /include/db/mysql/mysqli.php

Posted by Ulf Dunkel 
Fatal error in /include/db/mysql/mysqli.php
October 19, 2023 09:31AM
Dear Phorum developers.

I have moved one of my Phorum installations to a new place and now I always run into this error:

Language: PHP
<b>Fatal error</b>: Uncaught mysqli_sql_exception: Duplicate entry ';hooks'; for key ';P5_iC_settings.PRIMARY'; in /<myserver>/phorum/include/db/mysql/mysqli.php:149

mysqli.php, line 149, reads:

Language: PHP
$res = mysqli_query($conn, $sql);

How can I fix this issue?

Regards, Ulf Dunkel
Re: Fatal error in /include/db/mysql/mysqli.php
October 20, 2023 02:03PM
Backup the database.

Quote

Duplicate entry ';hooks';
for key ';P5_iC_settings.PRIMARY';
I believe a primary key must be "unique" entry.

Disable mods and see if the issue goes away.
Turn the mods back on one at a time and test.
Try rebuilding the tables using mysql maintenance utility.
Re: Fatal error in /include/db/mysql/mysqli.php
June 13, 2024 09:20AM
I have no idea how to disable used mods for the phorum as I cannot access any phorum pages on my browser right now. I have access to the MySQL database though.

This is the whole error message:

Language: HTML
<!-- Fatal error: Uncaught mysqli_sql_exception: Duplicate entry `hooks´ for key `phorum_settings.PRIMARY´ in /phorum/include/db/mysql/mysqli.php:149 Stack trace: #0 /phorum/include/db/mysql/mysqli.php(149): mysqli_query() #1 /phorum/include/db/mysql.php(426): phorum_db_interact() #2 /phorum/include/api/modules.php(492): phorum_db_update_settings() #3 /phorum/include/admin/header.php(174): phorum_api_modules_save() #4 /phorum/admin.php(108): include_once(...) #5 {main} thrown in /phorum/include/db/mysql/mysqli.php on line 149 -->

I did not manipulate any Phorum database tables or data myself already.

Please help.

Regards, Ulf Dunkel
Sorry, only registered users may post in this forum.

Click here to login