title: Error 500 on Ajax Call
body: <p>So I am developing a website where users can write articles. I'm coming across a problem. When a user writes a short article it works fine, but when a user writes or edits a longer article it gives me an Ajax 500 Error in the console. I'm not sure if the problem is happening because I'm working with <a href="https://ckeditor.com/" rel="nofollow noreferrer">CKEditor</a>. Anyways this is the code I'm using to send my article with Ajax:</p>
  
  <pre><code>var name        = $(".article_name").val().trim(),
      image       = $("#article_input").val(),
      category_id = $(".txtArticleCategory").val().trim(),
      short_body  = $(".txtShortBodyArticle").val().trim(),
      tags        = $(".txtTagsArticle").val().trim(),
      body        = CKEDITOR.instances['txtArticleBody'].getData();
  
      if(name !== "" &amp;&amp; image !== "" &amp;&amp; category_id &gt; 0 &amp;&amp; body !== "" &amp;&amp; short_body !== "" &amp;&amp; tags !== ""){    
        var formData = new FormData($('#insertArticleForm')[0]);
        formData.append("body", body);
  
        $.ajax({
            xhr: function() {
              var xhr = new window.XMLHttpRequest();
  
              xhr.upload.addEventListener("progress", function(evt) {
                if (evt.lengthComputable) {
                  var percentComplete = evt.loaded / evt.total;
                  percentComplete = parseInt(percentComplete * 100);
  
                  //update progress bar width
                  $('.progress-bar-custom &gt; span').css('width', percentComplete + "%");    
                }
              }, false);
  
              return xhr;
            },
            type: "POST",
            url: '/actions/update_article.php',
            data: formData,
            processData: false,
            contentType: false,
            success: function (data) {
                $('.progress-bar-custom').css('display', 'none');
                $('.progress-bar-custom &gt; span').css('width', '0%');
  
                if(data == 'true'){
                  // Empty textboxes
                  $(".article_name, .txtArticleCategory").val("");
                  CKEDITOR.instances['txtArticleBody'].setData("");
  
                  alert('Article added.');
                }else if (data == "size") {
                  alert('Image too big. Max size is 2mb');
                }else if (data == "false") {
                  alert('Error, please try again.');
                }
            },
            error: function(){
              alert('Error, please try again.');
            }
        });
      }else{
        alert("Complete a text fields.");
      }
    });
  </code></pre>
  
  <p>This is the error i'm getting:</p>
  
  <pre><code>jquery.min.js:4 POST http://sub.domain.net/actions/update_article.php 500 (Internal Server Error)
  </code></pre>
  
  <p>The error only happens when I try adding or editing a large article, anyone know why this is happening or how I can fix it? Any help is appreciated. </p>