Search code examples
phpserverinternal-server-errormybb

500 error on moving project to another server


After moving my project to another server, i got an 500 internal error on my page called 2fa.php.

I have already solved this bug ont time on giving file permission but now if i want to give file permission or anything i'm gotting 500 internal error after log in.

On nginx configuration file i don't have any info. just the method that used and error code 500 access.log:

127.0.0.1 - - [09/May/2020:20:44:56 +0300] "GET /2fa.php HTTP/1.1" 500 11 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"

EDIT

error log thrown in /var/www/chronic/2fa.php on line 27" while reading response header from upstream, client: 127.0.0.1, server:, request: "GET /2fa.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host:

So i don't know what i need to do.

This error is not normal because nginx don't give the html page error, i just can see the error in the console debug.

I'm using fluxBB Forum.


Solution

  • without seeing the actual script in its original context its very hard for us to help you figure it out, but here are a few things to check in general:

    1. make sure you are using compatible server (NGinx), and compatible PHP version (if possible even the exact same version)

    2. Check your php.ini, you might have forgot something when you migrated. make sure required extensions are present, limitations, and other settings do support your app.

    3. check security settings, are connections allowed? and if you are connecting external services from your script, are these connections allowed as well?

    4. Did you forget libraries when you migrated? make sure all required libraries are present.

    5. enable full error reporting E_ALL and allow NGinx to display errors so you can see exactly where it failed, I'm sure it will get you one step closer to debugging it.