Error using the examples.

Error using the examples.

JoseanJosean Posts: 21Questions: 4Answers: 0

Hello,

I installed the php version on my local server

the following error occurs, can you help me ?:

Datatables warning: table id = example. Ajax error. For more information about this error please see http://datatables.net/tn/7

Jose Angel Martinez.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,299Questions: 26Answers: 4,945

    Have you followed the troubleshooting steps at the link provided in the error?

    https://datatables.net/manual/tech-notes/7

    first you need to determine what the server is returning then debug why the server is not returning the expected data.

    Kevin

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    No se hacer lo que me aconsejas. No se mirar lo que devuelve el servidor y tampoco depurar. Tengo mucho para aprender. Parece que php no se ejecutaba correctamente. Una vez asignado se leen los datos y los veo. Pero no consigo añadir, modificar y borrar.

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    Corrigo mensaje anterior. No se hacer lo que yo aconsejas No se ver lo que devuelve el servidor y tampoco se depurar. Tengo mucho para aprender. Parece que php no se ejecutaba correctamente. Una vez asignado se leen los datos y los veo. Pero no consigo añadir, modificar y borrar.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    If you follow the instructions at the tech note the error message links to, what does it show the server as returning? Also are there any errors logged in the server's error logs?

    Thanks,
    Allan

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    How to be see the server error log?

    Thank you

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    Error messages are not displayed. When I try to add records they are not added. What happens is that the lines are duplicated. The modification of lines does not occur nor does the deletion. Well, when you erase the line it disappears but when you refresh the screen it reappears. This indicates that the deletion does not affect the database.

    Thanks,
    Josean.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    The error log location will depend upon the configuration of your http server. Typically on a linux like server it would be in /var/log/apache/error_log. It you are using a virtual host it might be in a different location though. You'd need to ask your server admin (or check the http server documentation if you are the server admin).

    Allan

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    Hello again, thanks for your interest. I have installed xampp. Through the control panel I access log files. I'm seeing that in the apache file called error.log lines are not recorded when I try to add, modify or delete records. However, the database does not include the modifications.

    I do not know what I can do.

    Thank you.
    Josean

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    What is the status code that is being returned by the server for the Ajax submit? Your browser's Network inspector will show that.

    If you can link to the page I can take a look.

    Allan

  • JoseanJosean Posts: 21Questions: 4Answers: 0

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    This is my browser's Network inspector?
    I do not see error in ajax
    I can't link to the page. I use a local server

    Thanks
    Josean.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    edited May 2018 Answer ✓

    Click on the "staff.php" line in the network panel. It will show you the response from the server.

    Allan

  • JoseanJosean Posts: 21Questions: 4Answers: 0

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    Surely I do not understand much, but I do not see any error.

    Thanks
    Josean.

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    I'm going to upload the web to a free server to see if it's lucky and it works.

    Josean.

  • kthorngrenkthorngren Posts: 21,299Questions: 26Answers: 4,945

    My understanding of the problem is when you are trying the edit functions. But it looks like you are looking at 'staff.php' after the page first loads. Is that correct?

    If so then you will want to look at the same network responses but after you replicate one of the issues with editing.

    Kevin

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    the light has been made. This morning works perfectly, I do not understand it.

    Thanks
    Josean.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Perhaps a caching issue. Either way, good to hear it works now.

    Allan

  • JoseanJosean Posts: 21Questions: 4Answers: 0

    Say the first thing that my language is Spanish, so surely I will not express myself well in English. I use the PhpStorm IDE. There's the problem. If I run the application inside the IDE it is not going well, but if I run it directly in the browser it works correctly. It must be something related to the php version.

    I want to do a few more tests to verify that I am able to understand the operation and then I will buy the application.

    Thanks for everything.
    Josean

This discussion has been closed.