Table doesn't work properly after move to hosting

Table doesn't work properly after move to hosting

dadko123456789dadko123456789 Posts: 8Questions: 1Answers: 0

Hello,

I have a problem with datatables, I'm getting this error after I moved mi website from the vps server to the shared hosting.
When I have for example 10 pages and then I try to go to the last page, I get this:

DataTables warning: table id=list_table - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

Also when I have some larger table with more entries.

Can you help me? I already extended every PHP parameter, like memory_limit, max_execution_time, post_max_size, etc.

Thanks!

David

Replies

  • kthorngrenkthorngren Posts: 21,680Questions: 26Answers: 5,019

    Did you follow the steps in the link provided in the error?
    http://datatables.net/tn/1

    What is the JSON response?

    Likely you will need to look at the server error logs to find the problem.

    Kevin

  • dadko123456789dadko123456789 Posts: 8Questions: 1Answers: 0

    Yes, I followed these steps, but I got nothing in the response in console.

    I tried to look into server logs but there wasn't any error.
    It seems like it cannot handle larger tables.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @dadko123456789 ,

    There's no limit on large tables. Can you link to your page so we can take a look?

    Cheers,

    Colin

  • dadko123456789dadko123456789 Posts: 8Questions: 1Answers: 0

    Hello colin,

    thank you for your answer.
    Here is the link to the page: https://dadko.xyz/banned.php

  • allanallan Posts: 64,016Questions: 1Answers: 10,555 Site admin

    The banned_list.php file is returned zero data. That is invalid JSON hence the error.

    Try adding:

    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    

    at the top of your banned_list.php file (inside the <?php) to force PHP to show errors.

    Allan

  • dadko123456789dadko123456789 Posts: 8Questions: 1Answers: 0

    I added it, even changed PHP settings in control panel of my hosting, but I got no errors, dunno where the problem can be, sometimes it works, sometimes not

  • allanallan Posts: 64,016Questions: 1Answers: 10,555 Site admin

    The most likely thing to my mind is a utf8 encoding issue. What character set is your dB in? Is that different from your device dB where it does work?

    Allan

  • dadko123456789dadko123456789 Posts: 8Questions: 1Answers: 0

    Thanks so much allan!
    It was the problem with utf8 encoding, I fixed it and everything works now :smile:

This discussion has been closed.