Ilya Pavlov2016-10-21 00:20:39
Ilya Pavlov, 2016-10-21 00:20:39

500 error, which is No!?

There is a code:

 type : 'POST',
 url : 'ajax.php',
 dataType : 'html',
 data : { page : page },

And there is a smartphone: "Wileyfox Swift", which has Chrome (latest version).

After executing this code, after some time (15 seconds), the following appears in the console:


What is most interesting: on any other smartphone / computer, in any browser that supports Js, Ajax, it all works!

I will say right away that of course there is no 500 error. Even in the logs on the server it is empty about this file (ajax.php).

As I understand it, the problem is precisely in the transmission by the POST method, because if you change POST to GET, then there is no error + if you remove
page : page
it, that is, if nothing is sent,
it also disappears.

I already had the same error on the same smartphone, but it quickly disappeared, I didn’t even have time to figure it out.

The phone rebooted, Chrome reinstalled.

What should I do???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Zlatoslav Desyatnikov, 2016-10-21

It cannot be that there is no error if the browser shows it.
Open the "Network" tab in "DevTools" and look at the server's response to this request.

mletov, 2016-10-21

What you can try:
1) Put try/catch in ajax.php and send an error code to soap
2) Put another browser on the same smart, see what happens
3) In the settings of this browser, play around with the header sent, usually on mobile phones there is a browser setting like "mobile mode / PC mode"
4) Create a type form <form method="post" action="ajax.php">and send from smart the same data that is sent by ajax
5) Clear the ajax.php file, leave only var_dump($_POST), see what causes the error, code handler in php or something else. If the error disappears, what to look at what kind of code.
6) Also try on different Internet, for example, mobile and wi-fi. On Habré, they often write how opsos interfere with traffic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question