500 Internal Server Error

My website URL is:

http://sakib2tweeter.epizy.com/

What I’m seeing is:

I’m using this software:

WinSCP, Google Chrome

Additional information:

The login button was working fine yesterday. Today it is not working. It stopped working after I erased my cookies and caches.

For me it shows the same console output, but with detailed informations: POST url 500 (Internal Server Error) from jquery-3.4.1.min.js. I can even see the two jQueries on the code, the Slim 3.2.1 and the normal 3.4.1. I would remove the 3.2.1-slim one and add the 3.4.1-slim one instead in the code (and overall delete the normal 3.4.1 jQuery), and would also enable the Display Errors from Alter PHP Config to see what’s the problem.

1 Like

Thank You so much for your reply. If I use the slim 3.4.1, then I get this error.

$("#loginSignUpButton").click(function()
{
// alert(“clicked”);
$.ajax({
type: “POST”,
url: “actions.php?action=loginSignup”,
data: “email=” + $("#email").val()+"&password=" + $("#password").val() + “&loginActive=” + $("#loginActive").val(),
success: function(result)
{
alert(result);
if(result == “1”)
{
echo “success”;
}
else
{
$("#loginAlert").html(result).show();
}
}
});

This is my loginButton clickListener.
It worked fine yesterday. Today it is not.

You can call jQuery with jQuery instead of the dollar sign. In the code replace $ with jQuery.
EDIT: You need to correct the bugs in actions.php, because the code reports a 500 Internal Server Error.

1 Like

Thank you so much. I found the error.
It was a simple sql statement error in action.php.
My sql command was
mysqli_query($link,“INSERT INTO tweets(tweet,userid,datetime)
VALUES
(’”.mysqli_real_escape_string($link,$_POST[‘tweetContent’])."’,".mysqli_real_escape_string($link,$_SESSION[‘id’]).",NOW())");
echo “1”;

Apparently datetime has to be in the quote. Because it is a datatype.
I can’t thank you enough. I owe you. I was stuck here for two days.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.