debug on remotecontrol

  • nicola_86
  • nicola_86s Avatar Autor
  • Besucher
  • Besucher
4 Jahre 3 Monate her #97619 von nicola_86
nicola_86 erstellte das Thema debug on remotecontrol
Hi,
I'd like to see the parameters that arrive within my json call. Is it possible through some prints in some point of the file remotecontrol.php? I was trying to understand reading the file and doing some test.
Any help would be appreciate.
thanks

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 3 Monate her #97620 von mdekker
mdekker antwortete auf das Thema: debug on remotecontrol
When you use json, go to application\libraries\LSjsonRPCServer.php. In the very beginning line 24 your json reuqest will be converted to a request. If you output that you will see what you have. When you get no response on remotecontrol most probably the json_decode fails due to incorrect json string. We should be able to trap that in the future and deliver a nice error.

---
Menno Dekker
Folgende Benutzer bedankten sich: nicola_86

Bitte Anmelden um an der Konversation teilzunehmen.

  • nicola_86
  • nicola_86s Avatar Autor
  • Besucher
  • Besucher
4 Jahre 3 Monate her #97633 von nicola_86
nicola_86 antwortete auf das Thema: debug on remotecontrol
thanks for the suggestion, it works. :)
however with request with a wrong json sintaxt it's better to put the print before decoding it
I had a good result doing that:

// reads the input data
print_r(file_get_contents('php://input'));
$request = json_decode(file_get_contents('php://input'),true);
print_r("request: ");
print_r($request);

Thanks a lot!

Bitte Anmelden um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten