Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API ERROR
04-03-2013, 09:15 PM, (This post was last modified: 04-04-2013, 07:32 AM by phil.)
#4
RE: API ERROR
Hi, The crucial part of your output is here:

(04-03-2013, 06:27 PM)Gamini Wrote: HEADER: date: Wed, 03 Apr 2013 08:15:21 GMT
HEADER: server: Apache/2.4.2 (Win64) PHP/5.4.3
HEADER: x-powered-by: PHP/5.4.3
HEADER: set-cookie: webERPapi=io8vejlf87pnoab33agqcec851; path=/
HEADER: expires: Thu, 19 Nov 1981 08:52:00 GMT
HEADER: cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
HEADER: pragma: no-cache
HEADER: content-length: 0
HEADER: connection: close
HEADER: content-type: text/html
COOKIE: webERPapi=io8vejlf87pnoab33agqcec851

You can see that the content length returned is zero bytes, but that you got a HTTP/1.1 200 OK reply from the server so that you know the connection was made fine. Here is the output for the same function call in my tutorial:

HEADER: date: Wed, 03 Apr 2013 10:16:02 GMT
HEADER: server: Apache/2.2.22 (Ubuntu)
HEADER: x-powered-by: PHP/5.4.6-1ubuntu1.2
HEADER: set-cookie: KwaMojaapi=7p92iirlt6i26mgmpj2ssjs711; path=/
HEADER: expires: Thu, 19 Nov 1981 08:52:00 GMT
HEADER: cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
HEADER: pragma: no-cache
HEADER: vary: Accept-Encoding
HEADER: content-encoding: gzip
HEADER: content-length: 196
HEADER: connection: close
HEADER: content-type: text/xml
COOKIE: KwaMojaapi=7p92iirlt6i26mgmpj2ssjs711

As you can see it returned 196 bytes of info. My guess is going to be that it is because you don't have these two lines in your output:

HEADER: vary: Accept-Encoding
HEADER: content-encoding: gzip

meaning that you don't have the mod_deflate apache module enabled. Can you enable this (google for how to do it) restart apache, and try again.

Thanks
Tim

Reply


Messages In This Thread
API ERROR - by Gamini - 03-14-2013, 06:06 PM
RE: API ERROR - by etabaraz - 03-28-2013, 11:54 PM
RE: API ERROR - by Gamini - 04-03-2013, 06:27 PM
RE: API ERROR - by etainsee - 04-03-2013, 09:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)