0

Here, i am using bootstrap datatables to load my data from database. But when i open the page it shows the error and in console it shows ---Failed to load resource: the server responded with a status of 500 (Internal Server Error).. How to solve this problem..Please help

Eleas
  • 1
  • 1
  • 1
    Solve what ever causing the http 500 error code. Not to be arrogant, this is just the only answer anyone can give. Your problem has nothing to do with DataTables, and there is literally millions of potential reasons why you get a 500 from your server. Typically it is caused by some error in the server script code or in the server config, for example a bad .htaccess. – davidkonrad May 23 '20 at 06:15
  • So, david you are saying , this problem has nothing to do with DataTables but it says DataTables warning: table id=user_data - Ajax error. What do you think about it?? Thanks – Eleas May 23 '20 at 08:40
  • I think that DataTables gracefully handle an error that is not caused by DataTables itself. You have a problem with your server script, it can be anything from a PHP script not being closed properly to a complete misconfiguration. I would take a look at the script that is called via AJAX. – davidkonrad May 23 '20 at 08:47
  • Hello, here is the link of my script and sorry for being late: https://gist.github.com/1233ww/9f6e7931958303f8856bdad5e991611a – Eleas May 23 '20 at 09:01
  • 1
    this is the client side script. The error you experience come from serverside, probably the script `fetch.php` ...When you have fixed that, consider to add a column / columnDefs section to your DT initialization. – davidkonrad May 23 '20 at 11:40
  • Try adding your backend script after removing private info like usernames and passwords. – vimuth May 23 '20 at 22:09

0 Answers0