error while importing db during install: duplicate entry
error while importing db during install: duplicate entry
Hi,
I'm stuck trying to install 3.3.10 on one of our servers.
The first issue was that the install script seems to expect a database access to a local db server without credentials. The Screen for Step 2 (System Check) shows up but is empty; no error message; found out about this in the error messages of the web server. So I provided credentials in a copy of config.php. After that Step 2 (System Check) showed up and everything seems ok (YAY! )
Next problem: Step 4 (Configuration) shows the already entered database credentials (password is masked). I learned that it is necessary to enter the password again. Our password for database access is 20 characters long; it seems that in Step 4 only 11 characters are displayed in the password field. After entering the password again, selecting the language packs (english) and entering the initial admin user credentials (Step 5) the next step (Step 6) began to populate the database (YAY! ) but stopped after two seconds showing "PHP ERROR" . Again: no additional information.
The web server log shows the probable reason for the error:
PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '0' for key 'PRIMARY' in /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php:127\nStack trace:\n#0 /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php(127): mysqli_query()\n#1 /var/www/forma.lms/formalms/db/lib.docebodb.php(522): mysqli_DbConn->query()\n#2 /var/www/forma.lms/formalms/lib/installer/lib.role.php(30): sql_query()\n#3 /var/www/forma.lms/formalms/install/import_db.php(180): addRoles()\n#4 /var/www/forma.lms/formalms/install/import_db.php(81): addInstallerRoles()\n#5 {main}\n thrown in /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php on line 127, referer: [...]
System information (output of Step 2):
Server information
Server software : : Apache/2.4.56 (Debian)
PHP Version : : 8.2.7
MySQL/MariaDB Client Version : : 8.2.7
MySQL/MariaDB Server Version : : 10.5.19
Multibyte Support: ON
mime_content_type() support: ON
Fileinfo support : ON
Ldap : : OFF Consider this warning only if you need to use LDAP
Openssl : : ON
Site Timezone: UTC
PHP Information :
magic_quotes_gpc : : OFF
Safe mode : : OFF
register_global : : OFF
allow_url_fopen : : ON
allow_url_include : : OFF
upload_max_filsize : : 32M
post_max_size : : 32M
max_execution_time : : 30s
I'm aware, that our system runs a PHP version that is higher than the version recommended for FormaLMS 3.3.10 but I can't step down to PHP 7.4 due to compliance reasons as it already has reached EOL. I also assume that the "duplicate entry" issue is not linked to a specific PHP version.
Please help.
Cheers,
Thiemo
I'm stuck trying to install 3.3.10 on one of our servers.
The first issue was that the install script seems to expect a database access to a local db server without credentials. The Screen for Step 2 (System Check) shows up but is empty; no error message; found out about this in the error messages of the web server. So I provided credentials in a copy of config.php. After that Step 2 (System Check) showed up and everything seems ok (YAY! )
Next problem: Step 4 (Configuration) shows the already entered database credentials (password is masked). I learned that it is necessary to enter the password again. Our password for database access is 20 characters long; it seems that in Step 4 only 11 characters are displayed in the password field. After entering the password again, selecting the language packs (english) and entering the initial admin user credentials (Step 5) the next step (Step 6) began to populate the database (YAY! ) but stopped after two seconds showing "PHP ERROR" . Again: no additional information.
The web server log shows the probable reason for the error:
PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '0' for key 'PRIMARY' in /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php:127\nStack trace:\n#0 /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php(127): mysqli_query()\n#1 /var/www/forma.lms/formalms/db/lib.docebodb.php(522): mysqli_DbConn->query()\n#2 /var/www/forma.lms/formalms/lib/installer/lib.role.php(30): sql_query()\n#3 /var/www/forma.lms/formalms/install/import_db.php(180): addRoles()\n#4 /var/www/forma.lms/formalms/install/import_db.php(81): addInstallerRoles()\n#5 {main}\n thrown in /var/www/forma.lms/formalms/db/drivers/docebodb.mysqli.php on line 127, referer: [...]
System information (output of Step 2):
Server information
Server software : : Apache/2.4.56 (Debian)
PHP Version : : 8.2.7
MySQL/MariaDB Client Version : : 8.2.7
MySQL/MariaDB Server Version : : 10.5.19
Multibyte Support: ON
mime_content_type() support: ON
Fileinfo support : ON
Ldap : : OFF Consider this warning only if you need to use LDAP
Openssl : : ON
Site Timezone: UTC
PHP Information :
magic_quotes_gpc : : OFF
Safe mode : : OFF
register_global : : OFF
allow_url_fopen : : ON
allow_url_include : : OFF
upload_max_filsize : : 32M
post_max_size : : 32M
max_execution_time : : 30s
I'm aware, that our system runs a PHP version that is higher than the version recommended for FormaLMS 3.3.10 but I can't step down to PHP 7.4 due to compliance reasons as it already has reached EOL. I also assume that the "duplicate entry" issue is not linked to a specific PHP version.
Please help.
Cheers,
Thiemo
Re: error while importing db during install: duplicate entry
Hi,
1) The first issue was that the install script seems to expect a database access to a local db server without credentials.
What makes you assume that?
2) What is the last created table?
3) PHP version is not responsible of that error, but it will cause further and fatal errors.
1) The first issue was that the install script seems to expect a database access to a local db server without credentials.
What makes you assume that?
2) What is the last created table?
3) PHP version is not responsible of that error, but it will cause further and fatal errors.
Per supporto GRATUITO contattatemi in privato qui
Re: error while importing db during install: duplicate entry
Hi,
thank you for your quick reply.
ad 1) because the web server log showed a PHP Fatal Error with a mysqli exception (Access denied for db access) and the http reply to hitting the "Next step" button was a 500 server error.
ad 2) how can I tell?
the db has the following tables:
conference_booking
conference_chat_msg
conference_chatperm
conference_dimdim
conference_menu
conference_menu_under
conference_room
conference_rules_admin
conference_rules_room
conference_rules_root
conference_rules_user
conference_teleskill
conference_teleskill_log
conference_teleskill_room
core_admin_course
core_admin_tree
core_calendar
core_code
core_code_association
core_code_course
core_code_groups
core_code_org
core_connection
core_connector
core_country
core_customfield
core_customfield_area
core_customfield_entry
core_customfield_lang
core_customfield_son
core_customfield_son_lang
core_customfield_type
core_db_upgrades
core_deleted_user
core_event
core_event_class
core_event_consumer
core_event_consumer_class
core_event_manager
core_event_property
core_event_user
core_field
core_field_son
core_field_type
core_field_userentry
core_fncrole
core_fncrole_competence
core_fncrole_group
core_fncrole_group_lang
core_fncrole_lang
core_group
core_group_fields
core_group_members
core_group_user_waiting
core_hteditor
core_lang_language
core_lang_text
core_lang_translation
core_menu
core_menu_under
core_message
core_message_user
core_newsletter
core_newsletter_sendto
core_org_chart
core_org_chart_field
core_org_chart_fieldentry
core_org_chart_tree
core_password_history
core_platform
core_plugin
core_privacypolicy
core_privacypolicy_lang
core_privacypolicy_user
core_pwd_recover
core_reg_list
core_reg_setting
core_requests
core_rest_authentication
core_revision
core_role
core_role_members
core_rules
core_rules_entity
core_rules_log
core_setting
core_setting_group
core_setting_list
core_setting_user
core_st
core_tag
core_tag_relation
core_tag_resource
core_task
core_transaction
core_transaction_info
core_user
core_user_file
core_user_log_attempt
core_user_profileview
core_user_temp
core_wiki
core_wiki_page
core_wiki_page_info
core_wiki_revision
dashboard_block_config
dashboard_blocks
dashboard_layouts
dashboard_permission
learning_advice
learning_adviceuser
learning_aggregated_cert_assign
learning_aggregated_cert_course
learning_aggregated_cert_coursepath
learning_aggregated_cert_metadata
learning_assessment_rule
learning_assessment_user
learning_calendar
learning_catalogue
learning_catalogue_entry
learning_catalogue_member
learning_category
learning_certificate
learning_certificate_assign
learning_certificate_course
learning_certificate_tags
learning_class_location
learning_classroom
learning_classroom_calendar
learning_comment_ajax
learning_commontrack
learning_communication
learning_communication_access
learning_communication_category
learning_communication_category_lang
learning_communication_lang
learning_communication_track
learning_competence
learning_competence_category
learning_competence_category_lang
learning_competence_course
learning_competence_lang
learning_competence_required
learning_competence_track
learning_competence_user
learning_course
learning_course_date
learning_course_date_day
learning_course_date_presence
learning_course_date_user
learning_course_editions
learning_course_editions_user
learning_course_file
learning_coursepath
learning_coursepath_courses
learning_coursepath_user
learning_coursereport
learning_coursereport_score
learning_courseuser
learning_faq
learning_faq_cat
learning_forum
learning_forum_access
learning_forum_notifier
learning_forum_timing
learning_forummessage
learning_forumthread
learning_games
learning_games_access
learning_games_track
learning_glossary
learning_glossaryterm
learning_homerepo
learning_htmlfront
learning_htmlpage
learning_htmlpage_attachment
learning_instmsg
learning_kb_rel
learning_kb_res
learning_kb_tag
learning_kb_tree
learning_kb_tree_info
learning_label
learning_label_course
learning_light_repo
learning_light_repo_files
learning_light_repo_user
learning_link
learning_link_cat
learning_lo_param
learning_lo_types
learning_materials_lesson
learning_materials_track
learning_menucourse_main
learning_menucourse_under
learning_menucustom
learning_menucustom_main
learning_menucustom_under
learning_middlearea
learning_module
learning_news_internal
learning_notes
learning_organization
learning_organization_access
learning_poll
learning_pollquest
learning_pollquest_extra
learning_pollquestanswer
learning_polltrack
learning_polltrack_answer
learning_prj
learning_prj_files
learning_prj_news
learning_prj_tasks
learning_prj_todo
learning_prj_users
learning_quest_category
learning_quest_type
learning_quest_type_poll
learning_repo
learning_report
learning_report_filter
learning_report_schedule
learning_report_schedule_recipient
learning_reservation_category
learning_reservation_events
learning_reservation_perm
learning_reservation_subscribed
learning_scorm_items
learning_scorm_items_track
learning_scorm_organizations
learning_scorm_package
learning_scorm_resources
learning_scorm_tracking
learning_scorm_tracking_history
learning_statuschangelog
learning_sysforum
learning_teacher_profile
learning_test
learning_testquest
learning_testquest_extra
learning_testquestanswer
learning_testquestanswer_associate
learning_testtrack
learning_testtrack_answer
learning_testtrack_page
learning_testtrack_quest
learning_testtrack_times
learning_time_period
learning_trackingeneral
learning_tracksession
learning_transaction
learning_transaction_info
learning_webpages
learning_wiki_course
ad 3) would PHP 8.1 be better? This would be acceptable for our compliance department (until 11/2024). Or would FormaLMS 4.0.0 be a better choice? (not publicly available)
Thanks and greetings from Austria.
Thiemo
thank you for your quick reply.
ad 1) because the web server log showed a PHP Fatal Error with a mysqli exception (Access denied for db access) and the http reply to hitting the "Next step" button was a 500 server error.
ad 2) how can I tell?
the db has the following tables:
conference_booking
conference_chat_msg
conference_chatperm
conference_dimdim
conference_menu
conference_menu_under
conference_room
conference_rules_admin
conference_rules_room
conference_rules_root
conference_rules_user
conference_teleskill
conference_teleskill_log
conference_teleskill_room
core_admin_course
core_admin_tree
core_calendar
core_code
core_code_association
core_code_course
core_code_groups
core_code_org
core_connection
core_connector
core_country
core_customfield
core_customfield_area
core_customfield_entry
core_customfield_lang
core_customfield_son
core_customfield_son_lang
core_customfield_type
core_db_upgrades
core_deleted_user
core_event
core_event_class
core_event_consumer
core_event_consumer_class
core_event_manager
core_event_property
core_event_user
core_field
core_field_son
core_field_type
core_field_userentry
core_fncrole
core_fncrole_competence
core_fncrole_group
core_fncrole_group_lang
core_fncrole_lang
core_group
core_group_fields
core_group_members
core_group_user_waiting
core_hteditor
core_lang_language
core_lang_text
core_lang_translation
core_menu
core_menu_under
core_message
core_message_user
core_newsletter
core_newsletter_sendto
core_org_chart
core_org_chart_field
core_org_chart_fieldentry
core_org_chart_tree
core_password_history
core_platform
core_plugin
core_privacypolicy
core_privacypolicy_lang
core_privacypolicy_user
core_pwd_recover
core_reg_list
core_reg_setting
core_requests
core_rest_authentication
core_revision
core_role
core_role_members
core_rules
core_rules_entity
core_rules_log
core_setting
core_setting_group
core_setting_list
core_setting_user
core_st
core_tag
core_tag_relation
core_tag_resource
core_task
core_transaction
core_transaction_info
core_user
core_user_file
core_user_log_attempt
core_user_profileview
core_user_temp
core_wiki
core_wiki_page
core_wiki_page_info
core_wiki_revision
dashboard_block_config
dashboard_blocks
dashboard_layouts
dashboard_permission
learning_advice
learning_adviceuser
learning_aggregated_cert_assign
learning_aggregated_cert_course
learning_aggregated_cert_coursepath
learning_aggregated_cert_metadata
learning_assessment_rule
learning_assessment_user
learning_calendar
learning_catalogue
learning_catalogue_entry
learning_catalogue_member
learning_category
learning_certificate
learning_certificate_assign
learning_certificate_course
learning_certificate_tags
learning_class_location
learning_classroom
learning_classroom_calendar
learning_comment_ajax
learning_commontrack
learning_communication
learning_communication_access
learning_communication_category
learning_communication_category_lang
learning_communication_lang
learning_communication_track
learning_competence
learning_competence_category
learning_competence_category_lang
learning_competence_course
learning_competence_lang
learning_competence_required
learning_competence_track
learning_competence_user
learning_course
learning_course_date
learning_course_date_day
learning_course_date_presence
learning_course_date_user
learning_course_editions
learning_course_editions_user
learning_course_file
learning_coursepath
learning_coursepath_courses
learning_coursepath_user
learning_coursereport
learning_coursereport_score
learning_courseuser
learning_faq
learning_faq_cat
learning_forum
learning_forum_access
learning_forum_notifier
learning_forum_timing
learning_forummessage
learning_forumthread
learning_games
learning_games_access
learning_games_track
learning_glossary
learning_glossaryterm
learning_homerepo
learning_htmlfront
learning_htmlpage
learning_htmlpage_attachment
learning_instmsg
learning_kb_rel
learning_kb_res
learning_kb_tag
learning_kb_tree
learning_kb_tree_info
learning_label
learning_label_course
learning_light_repo
learning_light_repo_files
learning_light_repo_user
learning_link
learning_link_cat
learning_lo_param
learning_lo_types
learning_materials_lesson
learning_materials_track
learning_menucourse_main
learning_menucourse_under
learning_menucustom
learning_menucustom_main
learning_menucustom_under
learning_middlearea
learning_module
learning_news_internal
learning_notes
learning_organization
learning_organization_access
learning_poll
learning_pollquest
learning_pollquest_extra
learning_pollquestanswer
learning_polltrack
learning_polltrack_answer
learning_prj
learning_prj_files
learning_prj_news
learning_prj_tasks
learning_prj_todo
learning_prj_users
learning_quest_category
learning_quest_type
learning_quest_type_poll
learning_repo
learning_report
learning_report_filter
learning_report_schedule
learning_report_schedule_recipient
learning_reservation_category
learning_reservation_events
learning_reservation_perm
learning_reservation_subscribed
learning_scorm_items
learning_scorm_items_track
learning_scorm_organizations
learning_scorm_package
learning_scorm_resources
learning_scorm_tracking
learning_scorm_tracking_history
learning_statuschangelog
learning_sysforum
learning_teacher_profile
learning_test
learning_testquest
learning_testquest_extra
learning_testquestanswer
learning_testquestanswer_associate
learning_testtrack
learning_testtrack_answer
learning_testtrack_page
learning_testtrack_quest
learning_testtrack_times
learning_time_period
learning_trackingeneral
learning_tracksession
learning_transaction
learning_transaction_info
learning_webpages
learning_wiki_course
ad 3) would PHP 8.1 be better? This would be acceptable for our compliance department (until 11/2024). Or would FormaLMS 4.0.0 be a better choice? (not publicly available)
Thanks and greetings from Austria.
Thiemo
Re: error while importing db during install: duplicate entry
1) Internal server error is a PHP fatal. So see point 3)
2) the mysql error is fired after the creation of main tables, so it's related to modifications added to sql install file, but mysql offers no better logs so I can't help you further
3) every version has its own requirements. If you are trying to install Forma 3.x and you use PHP 8.x you'll have fatal errors.
2) the mysql error is fired after the creation of main tables, so it's related to modifications added to sql install file, but mysql offers no better logs so I can't help you further
3) every version has its own requirements. If you are trying to install Forma 3.x and you use PHP 8.x you'll have fatal errors.
Per supporto GRATUITO contattatemi in privato qui
Re: error while importing db during install: duplicate entry
Thank you for your response.
Will keep on looking for an alternative solution.
Will keep on looking for an alternative solution.