Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9016207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:56:10+00:00 2026-06-16T03:56:10+00:00

I am receiving an internal server error, status 500 and I don’t know how

  • 0

I am receiving an internal server error, status 500 and I don’t know how to troubleshoot. I have added error catch for the ajax call but doesn’t tell me much. How do I add code to understand what is going on inside the requesting file? I have tried doing a var_dump() but nothing happends.

    $('#createpanelbutton').live('click', function(){

        var panelname = $('#panelname').val();
        var user_cat = $('#user_cat').val();
        //var whocan = $('#whocan').val();
        var errors='';
        if(panelname=='')
            errors+='Please enter a Brag Book name.<br/>';
        if(user_cat=='0')
            errors+='Please select a category.<br/>';
        if(errors!=''){
            $('#panel_errors2').html('<span class="panel_brag_errors">'+errors+'</span>');
            return false;
        }else{

         $('#createpanelbutton').val('Creating Brag Book...');
            $.ajax({
                async:false,
                dataType:'json',
                type: 'POST',
                url:baseurl+'createpanel.php',
                error:function(data,status,jqXHR){ alert("handshake didn't go through")},
                data:'name='+encodeURIComponent(panelname)+'&category='+encodeURIComponent(user_cat)+'&collaborator='+encodeURIComponent('me'),
                success:function(response){
                    if(response.status=='success')
                        location.href=response.url;
                    if(response.status=='failure')
                        $('#panel_errors2').html('<span class="panel_brag_errors">'+response.message+'</span>');
                }
            });
        }
    });

Ajax call to to php file createpanel.php:

 <?php

include_once('s_header2.php');

if($_POST){

    if($_POST['name'] == ''){
            $msg = "Please enter Brag Book name.";
            $result = array("status"=>'failure', "message"=>$msg);
    }elseif($_POST['category'] == ''){
            $msg = "Please select category.";
            $result = array("status"=>'failure', "message"=>$msg);
    }else{

        $db = Core::getInstance();
        $dbUp = $db->dbh->prepare("SELECT id FROM ".USERS_PANEL." WHERE user_id = :uID and title = :tit");         
        $result = '2';
        $dbUp->execute(array(':uID'=>$_SESSION['sesuid'],':tit'=>$_POST['name']));
        $result = '3';
        $numrows = $dbUp->rowCount();
        $result = '4';
        if($numrows == 0){
         $result = '5';
        $dbIn = $db->dbh->prepare("INSERT INTO ".USERS_PANEL." (`user_id`,`title`,`category_id`,`desc`,`type`,`friend_id`) VALUES (?, ?, ?, ?, ?, ?)");

         $dbIn->execute(array($_SESSION['sesuid'],$_POST['name'],$_POST['category'],$_POST['panel_desc'],$_POST['collaborator'],$_POST['jj']));

         $lid = $db->dbh->lastInsertId();            
        //header("Location: ".BASE_URL.addslashes($_POST['bname'])."-".$lid."/");

        $panelurl=BASE_URL.$_POST['name']."-".$lid."/";
        $result = array("status"=>'success', "url"=>$panelurl, "name"=>$_POST['name'], "id"=>$lid);

        }else{              
            $result = array("status"=>'failure', "message"=>'You already have a Brag Book with that name.');
        }
    }

}

echo json_encode($result) ;die;

?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:56:12+00:00Added an answer on June 16, 2026 at 3:56 am

    This post var isn’t being sent by your ajax request: $_POST['panel_desc']

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Issue I'm receiving the same error (500 Internal Server error) for all AJAX calls
I'm receiving 500 - Internal server error. on the domain of my WordPress site.
I am receiving a 500 Internal Server Error when trying to upload large files
I need to send 500 Internal Server Error from an PHP script under certain
I keep receiving an internal server error - 'BadValueError: Property content is required. It
I keep on receiving this error and i don't know where this error occurs
I have setup a postfix mail receiving server. On this I am using DKIM
I receiving a undefined reference error when try to compile an c++ program. I'm
I keep receiving this error... [2012-06-14 11:54:50,072: ERROR/MainProcess] Hard time limit (300s) exceeded for
I am receiving a parse error which is this: Parse error: syntax error, unexpected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.