I am working on a Web project for several months now. Since a few days ago, everything was easy, and I could send my data over the IP address with a GET request. This may not be the right way, but to me, it was functioning all well. To be honest, I do not know much about the server-side.
Now, I am requested to pass a greater amount of data to the PHP server that sends it to the database, and the IP address length exceeds 8190 characters. So, I read the Web and found out that a POST request to the PHP server would be more appropriate to pass the large amount of data.
By the way: The strings.excerpt just cuts out the beginning and the end of the content, if it exceeds 50 characters, and the messages.print just makes a compact log print to the console. So, there is nothing exciting about that…
it finishes with the 'Data sent successfully' message. Unfortunately, there is no new record in the database. If I uncomment one or more of the //print lines in the PHP code, I get the error message 'No connection possible!' with the sent renderedStaticPage (should contain an HTML page or part of it) and the Boolean newsTickerEnabled (0 or 1).
I heard from a colleague today about Postman plug-in for Google Chrome that I started to use. Whenever I have uncommented one or more //print lines in the PHP code, I can see that all the variables on the server are empty, and on the client side, there is the error message
SyntaxError: Unexpected token r in JSON at position 0 at JSON.parse (<anonymous>) at fromJson (ionic.bundle.js:10063) at defaultHttpResponseTransform (ionic.bundle.js:18080) at ionic.bundle.js:18171 at forEach (ionic.bundle.js:9168) at transformData (ionic.bundle.js:18170) at transformResponse (ionic.bundle.js:18926) at processQueue (ionic.bundle.js:23399) at ionic.bundle.js:23415 at Scope.$eval (ionic.bundle.js:24678)