Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: debug on remotecontrol

debug on remotecontrol 9 Monate 3 Wochen her #97619

  • nicola_86
  • nicola_86s Avatar
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

debug on remotecontrol 9 Monate 3 Wochen her #97620

  • mdekker
  • mdekkers Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 340
  • Dank erhalten: 68
  • Karma: 38
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: nicola_86

debug on remotecontrol 9 Monate 3 Wochen her #97633

  • nicola_86
  • nicola_86s Avatar
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!
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.130 Sekunden
Donation Image