vendredi 31 juillet 2015

500 Internal Server Error on AJAX Call ONLY on GoDaddy Plesk Server

I have a chat application that utilizes jQuery's AJAX method. The program works just fine on my local Apache (MAMP) server, but the same exact code is not posting the messages on my remote server. On my GoDaddy (Plesk/ASP.NET) site, I'm receiving the 500 internal server error on my xhr POST (post.php) request.

[post.php]

session_start();
if (isset($_SESSION['name'])) {
    $text = $_POST['text'];

    $fp = fopen("log.html", 'a');
    fwrite($fp, "<div class='msgln'>(".date("g:i A").") <b>".$_SESSION['name']."</b>: ".stripslashes(htmlspecialchars($text))."<br></div>");
    fclose($fp);
}

Do you guys have any idea what might be causing this? Thank you so much!!

Aucun commentaire:

Enregistrer un commentaire