K
K
Konstantin Khairov2016-10-31 03:43:14
PHP
Konstantin Khairov, 2016-10-31 03:43:14

DB gives error how to fix?

Hello everyone , recently when adding topics or comments to the site an error pops up .
When adding comments, this
MySQL error in file: /engine/modules/addcomments.php at line 530
Error Number: 2006
The Error returned was:
MySQL server has gone away
SQL query:
SELECT user_id, name, email, hash FROM dle_subscribe WHERE news_id='1360'
And this error when adding topics:
MySQL error in file: /engine/modules/functions.php at line 1180
Error Number: 2006
The Error returned was:
MySQL server has gone away
SQL query:
SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM dle_post p LEFT JOIN dle_post_extras e ON (p.id=e.news_id) WHERE category regexp '' AND approve=1 AND date < '2016-10-26 20:20:04' ORDER BY date DESC LIMIT 0.6
And the error when adding topics, it pops up only when the user adds a topic, if the administrator does this, there are no such problems. How can I fix it please?
PS Despite the fact that an error occurs, everything that is written is still added and displayed normally.
PPS By the way, I tried to install another engine on the same hosting and check if it works fine or gives errors as well. It works fine when adding topics and comments no errors. I tried reinstalling my dle and reinstalling everything. After installation, I tried to add a comment, everything works fine. As soon as the database was restored, the same errors immediately began to appear.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Belousov, 2016-10-31
@PafNutY

It's time to change hosting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question