Database error. v2.0.17

Started by uok825, January 22, 2021, 06:57:01 AM

Previous topic - Next topic

uok825

I am getting a data error while posting a thread. Later when I go to the main page, I see that the topic has opened, but when I click on it, I get another error, I stated both in the appendix.

Database error:


Second error:

tjbalon

For your first error, it appears that it is coming from the RelatedTopics mod (think this one: https://custom.simplemachines.org/mods/index.php?mod=189). Generally speaking it is best to post in that thread for the author to respond, however my best guess is the table was not successfully created on installation. I would recommend either:
1) attempt to uninstall the modification
2) attempt to restore to a previous backup

You could manually create the table smfprefix_related_subjects in your database, but this will not populate it with proper schema.

As for your second error, it seems that the way that you are inserting to the database has changed. Ensure the database table smfprefix_messages has the column id_msg and is the proper type (int(10), auto_increment). I would assume there is a possibility the RelatedTopics mod is causing the issue with the id_msg column, as that is not typical from a fresh installation (assuming this is a fresh install given being on a local host, and the message about install.php still being present).

uok825

Thanks for reply, i unistall the mods the problem solved but another problem cames. When i open a new topic i got this error.

"" 192.168.1.99 is currently unable to process this request. HTTP ERROR 500""



tjbalon

Could you post the contents of your error logs, when that error happens?

Usually found in /var/log/nginx or /var/log/apache2, not sure the system you are running on (if it is windows/IIS, error log will be in %SystemDrive%\inetpub\logs.

I am primarily looking for either your php logs and your web logs (for nginx or apache).

A 500 error occurs when there is an issue on the server itself, but we cannot discern what is it without additional information.

uok825

I run the server on my raspberry 3.

Here is logs error.log
[Thu Jan 21 10:33:12.078317 2021] [mpm_event:notice] [pid 1690:tid 1992733200] AH00489: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 10:33:12.078985 2021] [core:notice] [pid 1690:tid 1992733200] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 10:37:54.669069 2021] [mpm_event:notice] [pid 1690:tid 1992733200] AH00491: caught SIGTERM, shutting down
[Thu Jan 21 10:37:54.966381 2021] [mpm_prefork:notice] [pid 7777] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 10:37:54.967127 2021] [core:notice] [pid 7777] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 10:37:57.612728 2021] [mpm_prefork:notice] [pid 7777] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 10:37:58.215699 2021] [mpm_prefork:notice] [pid 7833] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 10:37:58.215955 2021] [core:notice] [pid 7833] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 10:42:30.017578 2021] [php7:error] [pid 7835] [client 192.168.1.33:63553] script '/var/www/html/setup.php' not found or unable to stat
[Thu Jan 21 10:48:44.425175 2021] [mpm_prefork:notice] [pid 7833] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 10:48:44.951416 2021] [mpm_prefork:notice] [pid 9686] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 10:48:44.951728 2021] [core:notice] [pid 9686] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 10:49:51.600579 2021] [mpm_prefork:notice] [pid 9686] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 10:49:52.121201 2021] [mpm_prefork:notice] [pid 10471] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 10:49:52.121576 2021] [core:notice] [pid 10471] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 11:00:17.246363 2021] [mpm_prefork:notice] [pid 10471] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 11:00:17.951051 2021] [mpm_prefork:notice] [pid 16410] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 11:00:17.951390 2021] [core:notice] [pid 16410] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 11:00:50.047047 2021] [php7:warn] [pid 16416] [client 192.168.1.33:63692] PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/phpmyadmin/libraries/config/FormDisplay.php on line 660
sh: 1: /usr/sbin/sendmail: not found
[Thu Jan 21 12:24:16.720974 2021] [mpm_prefork:notice] [pid 16410] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 12:24:34.053626 2021] [mpm_prefork:notice] [pid 606] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 12:24:34.057300 2021] [core:notice] [pid 606] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 21 23:43:45.069357 2021] [php7:warn] [pid 1977] [client 192.168.1.33:51588] PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/phpmyadmin/libraries/config/FormDisplay.php on line 660
[Thu Jan 21 23:50:20.769119 2021] [mpm_prefork:notice] [pid 606] AH00169: caught SIGTERM, shutting down
[Thu Jan 21 23:50:39.377271 2021] [mpm_prefork:notice] [pid 631] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Thu Jan 21 23:50:39.384900 2021] [core:notice] [pid 631] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 22 17:01:14.596655 2021] [php7:error] [pid 674] [client 192.168.1.33:54452] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:01:25.539201 2021] [php7:error] [pid 676] [client 192.168.1.33:54451] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:27.165244 2021] [php7:error] [pid 1226] [client 192.168.1.33:54454] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:28.163573 2021] [php7:error] [pid 679] [client 192.168.1.33:54456] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:34.894883 2021] [php7:error] [pid 678] [client 192.168.1.33:54457] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:01:55.283479 2021] [php7:warn] [pid 1198] [client 192.168.1.33:54459] PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/phpmyadmin/libraries/config/FormDisplay.php on line 660
[Fri Jan 22 17:03:01.263045 2021] [php7:error] [pid 1607] [client 192.168.1.33:54471] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:06:16.833192 2021] [php7:error] [pid 1208] [client 192.168.1.33:54489] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0


Thanks for helping me.

tjbalon

The modification did not install cleanly:


[Fri Jan 22 17:01:14.596655 2021] [php7:error] [pid 674] [client 192.168.1.33:54452] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:01:25.539201 2021] [php7:error] [pid 676] [client 192.168.1.33:54451] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:27.165244 2021] [php7:error] [pid 1226] [client 192.168.1.33:54454] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:28.163573 2021] [php7:error] [pid 679] [client 192.168.1.33:54456] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0
[Fri Jan 22 17:01:34.894883 2021] [php7:error] [pid 678] [client 192.168.1.33:54457] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:01:55.283479 2021] [php7:warn] [pid 1198] [client 192.168.1.33:54459] PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/phpmyadmin/libraries/config/FormDisplay.php on line 660
[Fri Jan 22 17:03:01.263045 2021] [php7:error] [pid 1607] [client 192.168.1.33:54471] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Subs-Post.php on line 1886, referer: http://192.168.1.99:8000/index.php?action=post;board=2.0
[Fri Jan 22 17:06:16.833192 2021] [php7:error] [pid 1208] [client 192.168.1.33:54489] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/Sources/Subs-Related.php' (include_path='.:/usr/share/php') in /var/www/html/Sources/Display.php on line 217, referer: http://192.168.1.99:8000/index.php?board=2.0


Do you have a backup, or can you manually remove the modification's change(s)?

uok825

I didn't get backup. I install the script yesterday. Which modification do i need to remove?
*My mods:
1.   Anti-Spam Links   1.0.2
2.   RIAST: Remove Index & Add Smart Title
3.   Default Avatar
4.   Misc Anti Spam   1.0
5.   NoFollow All Links
6.   Related Topics
7.   SMF Optimus
8.   Pretty URLs

tjbalon

6.   Related Topics

Needs to be uninstalled fully.

Kindred

if you had errors in the install or uninstall, that means that you will have to MANUALLY do those code edits
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tjbalon

If that was the most recent mod you have installed (it does not look like it from the list, but I am unsure if the list is sorted in order of install or not), you can find backups of the important files in Packages/backups/modname_before

This, at minimum, can be used to diff the existing files and discover what is wrong.

uok825

All problems solved. Thanks for the help. Have a good day!

https://custom.simplemachines.org/mods/index.php?action=parse;mod=189;attach=199471;smf_version=2.0.17 I did the opposite of everything on the link and the problem was solved.

tjbalon

Awesome! Glad it is all sorted 8)

Advertisement: