php 8.0 or higher

php 8.0 or higher

pakaymcpakaymc Posts: 3Questions: 1Answers: 0

I need to update to php 8.2 and when I update to a version higher than 7.4, my datatable only shows 2 rows. My query produces 15 rows. Any help wouls be appreciated.

I do not receive an error message, just limited data.

Answers

  • pakaymcpakaymc Posts: 3Questions: 1Answers: 0
    edited February 13

    These are the <head> settings:

    <link href="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.2.2/b-3.2.2/b-html5-3.2.2/b-print-3.2.2/fc-5.0.4/fh-4.0.1/datatables.min.css" rel="stylesheet" integrity="sha384-ogewkNX99342naCiAzlYXWImQW/LF2G6AFFnAItdt+X6N08cSaBmsKkfp6Hrx2sB" crossorigin="anonymous">
     
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js" integrity="sha384-VFQrHzqBh5qiJIU0uGU5CIW3+OWpdGGJM9LBnGbuIH2mkICcFZ7lPd/AAtI7SNf7" crossorigin="anonymous"></script>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js" integrity="sha384-/RlQG9uf0M2vcTw3CX7fbqgbj/h8wKxw7C3zu9/GxcBPRKOEcESxaxufwRXqzq6n" crossorigin="anonymous"></script>
    
    <script src="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.2.2/b-3.2.2/b-html5-3.2.2/b-print-3.2.2/fc-5.0.4/fh-4.0.1/datatables.min.js" integrity="sha384-3t9zg4qrAtb48DN5nDcbK/yNbWEu6TdLPRgZsIt0MqobtG9hwl+mAqNiwmJZdP4S" crossorigin="anonymous"></script>
    

    Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

  • kthorngrenkthorngren Posts: 21,670Questions: 26Answers: 5,017

    What troubleshooting steps have you taken and what did you find?

    Are you using a Datatables supplied server script?

    How are you loading the data?

    Have you verified that the server is providing the expected rows? For example if using ajax then use the browser's network inspector to see the JSON response.

    Can you post a link to a test case showing the issue so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • pakaymcpakaymc Posts: 3Questions: 1Answers: 0
    edited February 13

    At this time I have php set to 7.4 on my hosting account. All rows are displayed in the table. When I set php to 8.0 or higher, the table will display only two rows. The query does connect to the dadabase and retrieve all the data so the problem is not the database or php code when I change to php 8.0.
    In my testing I switched back to php 7.4 and all is well. until I use 8.0 again.

    This is the script currently being used:

    <link href="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.2.2/b-3.2.2/b-html5-3.2.2/b-print-3.2.2/fc-5.0.4/fh-4.0.1/datatables.min.css" rel="stylesheet" integrity="sha384-ogewkNX99342naCiAzlYXWImQW/LF2G6AFFnAItdt+X6N08cSaBmsKkfp6Hrx2sB" crossorigin="anonymous">
      
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js" integrity="sha384-VFQrHzqBh5qiJIU0uGU5CIW3+OWpdGGJM9LBnGbuIH2mkICcFZ7lPd/AAtI7SNf7" crossorigin="anonymous"></script>
     
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js" integrity="sha384-/RlQG9uf0M2vcTw3CX7fbqgbj/h8wKxw7C3zu9/GxcBPRKOEcESxaxufwRXqzq6n" crossorigin="anonymous"></script>
     
    <script src="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.2.2/b-3.2.2/b-html5-3.2.2/b-print-3.2.2/fc-5.0.4/fh-4.0.1/datatables.min.js" integrity="sha384-3t9zg4qrAtb48DN5nDcbK/yNbWEu6TdLPRgZsIt0MqobtG9hwl+mAqNiwmJZdP4S" crossorigin="anonymous"></script>
    

    Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

  • kthorngrenkthorngren Posts: 21,670Questions: 26Answers: 5,017

    Posting the Datatable include information really doesn't help us to debug the issue. I will ask my questions again to help further understand your environment.

    1. Are you using a Datatables supplied server script (PHP script) or your own custom script?
    2. How are you loading the data? In other words what is Datatables using as the data source?
    3. Have you verified that the server is sending the expected number of rows to the client? How this is done is based on the data source.

    Maybe you can post your Datatables initialization config. That will help to answer number 2.

    Datatalbes will load the number of rows provided. Since the only change is with the server PHP version I would concentrate on debugging the server side as the client side hasn't changed.

    Possibly use the debugger to provide information for the developer to review.

    Kevin

Sign In or Register to comment.