exception handled by API. message: "" #4

Open
soffi opened this Issue Oct 19, 2012 · 2 comments

Comments

Projects
None yet
3 participants

soffi commented Oct 19, 2012

Hi, I'm having trouble talking to the API with curl (both commandline and in php) and with wget

Every request I make throws this into my error_log

exception handled by API. message: ""

but using a browser works just great! :)

any idea how I should form my requests with curl?

supine commented Nov 8, 2012

Can you give an example of the curl command you are running, in particular the headers you are setting in the request?

I cannot use this via the command line with wget / curl, or via firefox or chrome.

Here is the URL that I am using:

http://racktables/racktables/api.php?method=get_status

Here are the messages in my *_log files:

==> /var/log/httpd/access_log <==
a.b.c.d - - [25/Nov/2012:06:29:11 +0000] "GET /racktables/api.php?method=get_status HTTP/1.1" 500 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"

==> /var/log/httpd/error_log <==
[Sun Nov 25 06:29:11 2012] [error] [client a.b.c.d] exception handled by API. message: "" request URI: /racktables/api.php?method=get_status
[Sun Nov 25 06:29:11 2012] [error] [client a.b.c.d] PHP Notice: Use of undefined constant JSON_FORCE_OBJECT - assumed 'JSON_FORCE_OBJECT' in /var/www/html/racktables/api.php on line 924
[Sun Nov 25 06:29:11 2012] [error] [client a.b.c.d] PHP Warning: json_encode() expects exactly 1 parameter, 2 given in /var/www/html/racktables/api.php on line 924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment