Jump to the post that solved this thread.
Solved: 1 Year, 5 Months, 4 Weeks ago HTTP 500 error on registration
#1
Solved: 1 Year, 5 Months, 4 Weeks ago
When i submit registration for a test account I am getting a HTTp 500 error. And it is not only me, i have a friend that is experiencing the same problem
I also checked error.log but didnt show nothing. Nothing.
Can someone help?

Also i have disabled all plugins but still the same.
Reply
#2
Solved: 1 Year, 5 Months, 4 Weeks ago
Check your web server logs. If you're on shared hosting, you might need to contact your host to get access to them.
Reply
#3
Solved: 1 Year, 5 Months, 4 Weeks ago
(2023-07-31, 02:40 AM)Laird Wrote: Check your web server logs. If you're on shared hosting, you might need to contact your host to get access to them.

u mean nginx? i did systemctl status but it did not say something interesting
   

also here is my nginx configuration if there is sumting needed to be removed lmk
server {

  listen 80;
  listen 443 ssl http2;

  server_name shuriken.pm;

	ssl_certificate /root/.acme.sh/shuriken.pm/fullchain.cer;
	ssl_certificate_key /root/.acme.sh/shuriken.pm/shuriken.pm.key;

	gzip on;
	gzip_disable "msie6";
	gzip_vary on;
	gzip_proxied any;
	gzip_min_length 1024;
	gzip_comp_level 8;
	gzip_buffers 16 8k;
	gzip_http_version 1.1;
	gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;


  root /var/www/shuriken.pm;

  index index.php;
  location / {
    index index.php;
    autoindex off;

    rewrite ^/forum-([0-9]+)\.html$ /forumdisplay.php?fid=$1;
    rewrite ^/forum-([0-9]+)-page-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2;
    rewrite ^/thread-([0-9]+)\.html$ /showthread.php?tid=$1;
    rewrite ^/thread-([0-9]+)-page-([0-9]+)\.html$ /showthread.php?tid=$1&page=$2;
    rewrite ^/thread-([0-9]+)-lastpost\.html$ /showthread.php?tid=$1&action=lastpost;
    rewrite ^/thread-([0-9]+)-nextnewest\.html$ /showthread.php?tid=$1&action=nextnewest;
    rewrite ^/thread-([0-9]+)-nextoldest\.html$ /showthread.php?tid=$1&action=nextoldest;
    rewrite ^/thread-([0-9]+)-newpost\.html$ /showthread.php?tid=$1&action=newpost;
    rewrite ^/thread-([0-9]+)-post-([0-9]+)\.html$ /showthread.php?tid=$1&pid=$2;
    rewrite ^/post-([0-9]+)\.html$ /showthread.php?pid=$1;
    rewrite ^/announcement-([0-9]+)\.html$ /announcements.php?aid=$1;
    rewrite ^/user-([0-9]+)\.html$ /member.php?action=profile&uid=$1;
    rewrite ^/calendar-([0-9]+)\.html$ /calendar.php?calendar=$1;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)\.html$ /calendar.php?action=yearview&calendar=$1&year=$2;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ /calendar.php?calendar=$1&year=$2&month=$3;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ /calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4;
    rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ /calendar.php?action=weekview&calendar=$1&week=$2;
    rewrite ^/event-([0-9]+)\.html$ /calendar.php?action=event&eid=$1;
  }

  # Deny access to internal files.
  location ~ /inc {
    deny all;
  }

  location ~ \.php$ {
	include snippets/fastcgi-php.conf;
    fastcgi_split_path_info ^(.+?\.php)(/.+)?$;
    fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
fastcgi_buffering off;
  }

}
Reply
#4
Solved: 1 Year, 5 Months, 4 Weeks ago
The nginx error log seems to generally be located at /var/log/nginx/error.log. See what you can find in there re this 500 error.
Reply
#5
Solved: 1 Year, 5 Months, 4 Weeks ago
(2023-07-31, 08:17 AM)Laird Wrote: The nginx error log seems to generally be located at /var/log/nginx/error.log. See what you can find in there re this 500 error.

got this error after attempt to register, seems to be related to mysql
2023/07/31 08:47:53 [error] 143893#143893: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught mysqli_sql_exception: Field 'default_tab' doesn't have a default value in /var/www/shuriken.pm/inc/db_mysqli.php:335
Stack trace:
#0 /var/www/shuriken.pm/inc/db_mysqli.php(335): mysqli_query()
#1 /var/www/shuriken.pm/inc/db_mysqli.php(378): DB_MySQLi->query()
#2 /var/www/shuriken.pm/inc/db_mysqli.php(842): DB_MySQLi->write_query()
#3 /var/www/shuriken.pm/inc/datahandlers/user.php(1232): DB_MySQLi->insert_query()
#4 /var/www/shuriken.pm/member.php(386): UserDataHandler->insert_user()
#5 {main}
  thrown in /var/www/shuriken.pm/inc/db_mysqli.php on line 335" while reading response header from upstream, client: 172.68.62.37, server: shuriken.pm, request: "POST /member.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "shuriken.pm", referrer: "https://shuriken.pm/member.php"
Reply
#6
Solved: 1 Year, 5 Months, 4 Weeks ago
It looks like you're using the MyTabs plugin, which adds a default_tab column to the mybb_users table, but doesn't set a default value for that column.

Try running this query on your database, which will alter that added column to set a default value of the empty string:

ALTER TABLE mybb_users CHANGE default_tab default_tab TEXT NOT NULL DEFAULT '';
Reply
#7
Solved: 1 Year, 5 Months, 4 Weeks ago
(2023-07-31, 08:58 AM)Laird Wrote:
ALTER TABLE mybb_users CHANGE default_tab default_tab TEXT NOT NULL DEFAULT '';
I did the command on dbeaver, after i tried registration i still got http500 error with the same kind of error on error.log.
did the same command for newpoints_items and ougc_awards and it worked!

a friend is having problems doing this
while he attempts to do the query he gets this error
[Image: image.png]
Reply
#8
Solved: 1 Year, 5 Months, 4 Weeks ago
Oh, right, I forgot - in strict mode, MySQL doesn't allow default values for TEXT columns. Try instead (for your friend and even for your own installation) to make the column nullable rather than having an empty-string default:

ALTER TABLE mybb_users CHANGE default_tab default_tab TEXT NULL;

Hopefully, that doesn't introduce any subtle errors due to queries not returning NULL columns.
Reply
#9
Solved: 1 Year, 5 Months, 4 Weeks ago
he did that but still doesnot work
he sent me this log
Stack trace:
#0 /var/www/html/inc/db_mysqli.php(335): mysqli_query()
#1 /var/www/html/inc/db_mysqli.php(378): DB_MySQLi->query()
#2 /var/www/html/inc/db_mysqli.php(842): DB_MySQLi->write_query()
#3 /var/www/html/inc/datahandlers/user.php(1232): DB_MySQLi->insert_query()
#4 /var/www/html/member.php(386): UserDataHandler->insert_user()
#5 {main}
  thrown in /var/www/html/inc/db_mysqli.php on line 335" while reading response header from upstream, client: [ REDACTED ], server: _, request: "POST /member.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "raiding.to", referrer: "https://raiding.to/member.php"
Reply
#10
Solved: 1 Year, 5 Months, 4 Weeks ago
What's above "Stack trace:"? There should be an error message with details of the actual error.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)