Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by dilitimor » 2022-08-19 16:38

I was deploying app on server. It was running well on the local
But I got error on page
This page isn’t working
103.97.101.142 is currently unable to handle this request.
HTTP ERROR 500

tail on error log
[Fri Aug 19 12:32:48.811469 2022] [php:error] [pid 23119] [client 10.1.1.1:43428] PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate key name 'name' in /var/www/html/kibas/db.php:109\nStack trace:\n#0 /var/www/html/kibas/db.php(109): mysqli_query()\n#1 /var/www/html/kibas/admin/incFunctions.php(416): db_query()\n#2 /var/www/html/kibas/admin/incFunctions.php(1077): sql()\n#3 /var/www/html/kibas/admin/incFunctions.php(833): update_membership_groups()\n#4 /var/www/html/kibas/lib.php(66): setupMembership()\n#5 /var/www/html/kibas/index.php(4): include_once('...')\n#6 {main}\n thrown in /var/www/html/kibas/db.php on line 109, referer: http://103.97.101.142/kibas/

I need help to solve this problem
Thank you in advance

User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

Re: Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by dilitimor » 2022-08-19 16:39

local:
appgini 5.95
win10
php 7.3
mariadb 10

server
ubuntu 20
mysql 8
php 8.1

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by D Oliveira » 2022-08-19 17:37

PHP 8.1 will throw so many errors for older appgini versions, change php version to 7.x on cpanel or update your app to 22.14

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by AhmedBR » 2022-08-19 19:31

7.4 is currently the best (at least for me) even with 22.14, no errors what so ever.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

Re: Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by dilitimor » 2022-08-19 23:07

Thank you Oliveira and Ahmed, I will share the result

User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

Re: Uncaught mysqli_sql_exception: Duplicate key name 'name' in db.php

Post by dilitimor » 2022-08-20 02:04

Case Solve
down grade to php 7.3 on server ubuntu
updtae to appgini 22.14

Thank you all once again

Post Reply