Page 1 of 1

500 Internal Server Error Something went wrong. Please try your request again

Posted: Fri Mar 16, 2018 1:30 am
by tryagain
Hello,

When I do a simple redirect using php header() function, I got en strange error!

PHP code example that caused the error on my server:

<?php
$url = "Any URL that is longer than 6k!";
header("Location: $url");
?>

Please run the PHP code above on your server to see if you will meet the same error. I guess because of PHP setting, NginX setting, Apache setting etc, but I can't solve it.
===============================================================
The error message on response page is:

500
Internal Server Error
Something went wrong. Please try your request again

Re: 500 Internal Server Error Something went wrong. Please try your request again

Posted: Sat Mar 17, 2018 2:26 am
by rhyker2u
500 internal server error are the worst to troubleshoot, unless you got server access ;-) and you probably do.

Thus check your:
/var/logs/nginx/domains
/var/logs/apache2/domains

otherwise you can spend weeks in a php and not get any further, while I simple glance at the error logs (can be done from your VestaCP backend too) usually exposes and allows to fix the problem within minutes. Or copy/paste the error here so we can further assist you.