PM General Error

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Liski999
Registered User
Posts: 1
Joined: Mon Sep 25, 2017 6:13 pm

PM General Error

Post by Liski999 » Mon Sep 25, 2017 6:15 pm

Whenever I go to read a PM, I get the following error message:


General Error
SQL ERROR [ mysqli ]

Duplicate entry 'notification.type.pm' for key 'type' [1062]

SQL

INSERT INTO phpbb_notification_types (notification_type_name, notification_type_enabled) VALUES ('notification.type.pm', 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 933
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 167
CALL: phpbb\notification\manager->get_notification_type_id()

FILE: [ROOT]/includes/functions_privmsgs.php
LINE: 886
CALL: phpbb\notification\manager->mark_notifications()

FILE: [ROOT]/includes/ucp/ucp_pm.php
LINE: 320
CALL: update_unread_status()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: ucp_pm->main()

FILE: [ROOT]/ucp.php
LINE: 394
CALL: p_master->load_active()




Just wondering what is wrong and has to be done to fix this problem.
Thank you.

User avatar
Leinad4Mind
Translator
Posts: 804
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

PM General Error

Post by Leinad4Mind » Tue Sep 26, 2017 8:28 am

Open config.php and change the dbm, if you've mysql, change to mysqli. Or vice-versa. It will solve it, 99% sure. :lol: And after solved, you can put the original value back again. I personally recommend mysqli.

Cheers
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

User avatar
canonknipser
Registered User
Posts: 1130
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: PM General Error

Post by canonknipser » Tue Sep 26, 2017 8:59 am

There is already a entry with the key value notification.type.pm in the table phpbb_notification_types
Liski999 wrote:
Mon Sep 25, 2017 6:15 pm
INSERT INTO phpbb_notification_types (notification_type_name, notification_type_enabled) VALUES ('notification.type.pm', 1)
, so delete that entry from the table phpbb_notification_types

But I wonder why that happens, do you have any extensions struggeling with PM installed?
Greetings
Frank
phpbb.de support team member
English is not my native language
New arrival - Extensions and scripts for phpBB
no support via PM or mail

User avatar
Leinad4Mind
Translator
Posts: 804
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: PM General Error

Post by Leinad4Mind » Tue Sep 26, 2017 9:24 am

This is a very known bug... and my solution worked in many many times. And its an easy solution.
It occurs due to a bug within PHP 5.3.3, 5.3.4 or 5.3.5 when using the mysqli driver.

The solutions to this problem are either:
1. Upgrade your version of PHP to 5.3.6 or higher. (Preferred if your server allows it)
2. If you can't update your PHP, then switch to "mysql" in your config.php file.
I saw a report here: https://tracker.phpbb.com/browse/PHPBB3-14992
So it was solved on 3.2.1 (or it should)

And there is an explanation for my solution too: https://www.phpbb.com/customise/db/exte ... 1?p=385446

PS: Don't forget to clean the cache.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

User avatar
david63
Jr. Extension Validator
Posts: 12812
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: PM General Error

Post by david63 » Tue Sep 26, 2017 9:47 am

Leinad4Mind wrote:
Tue Sep 26, 2017 9:24 am
This is a very known bug... and my solution worked in many many times. And its an easy solution.

It occurs due to a bug within PHP 5.3.3, 5.3.4 or 5.3.5 when using the mysqli driver.
The solutions to this problem are either:
1. Upgrade your version of PHP to 5.3.6 or higher. (Preferred if your server allows it)
2. If you can't update your PHP, then switch to "mysql" in your config.php file.
If you are upgrading tp phpBB 3.2.x then the minimum PHP requirement is 5.4.0 so there should not be any of the PHP 5.3 branch installed on the server
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email or as they will be ignored

User avatar
canonknipser
Registered User
Posts: 1130
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: PM General Error

Post by canonknipser » Tue Sep 26, 2017 10:32 am

Mixing up error messages from different problems is not very helpful.
Leinad4Mind wrote:
Tue Sep 26, 2017 9:24 am
I saw a report here: https://tracker.phpbb.com/browse/PHPBB3-14992
That error report is for the table phpbb_user_notifications because of receiving duplicate notifications, not for phpbb_notification_types - the TO has problem because of duplicate entries.

Its not the same error just because different table names contain the word notification and different error messages contain the word duplicate ...
Greetings
Frank
phpbb.de support team member
English is not my native language
New arrival - Extensions and scripts for phpBB
no support via PM or mail

User avatar
Leinad4Mind
Translator
Posts: 804
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: PM General Error

Post by Leinad4Mind » Tue Sep 26, 2017 10:40 am

Ups wrong copy past: https://tracker.phpbb.com/browse/PHPBB3-13678

This is the correct one. :lol: That I wanted to share.

I've solved even the phpbb_notification_types with this solution, pretty sure. But in any case, you give another good solution too. ;)

David: Yeah... you're right. But we never know fr sure if the user even posting in this subforum, if he is using 3.2. :lol:
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Baidu [Spider], canonknipser, Crizzo, Yandex [Bot] and 26 guests

cron