Charlie Boisseau Posted December 22, 2004 Posted December 22, 2004 When trying to convert my php which previously worked with FM6 (and an older copy of FX.php), I have been having real difficulties finding the source of a problem: When I attempt a simple query using FX, I get an error 502 back. When I try the query myself, directly requesting it from FMSA7, the 'errorcode' element is 0. This is the dump from the FX query response: Array ( [data] => Array ( ) [linkNext] => [linkPrevious] => [foundCount] => -1 [fields] => Array ( ) [url] => http://server/fmi/xml/FMPXMLRESULT.xml?-db=Flat+Codes&-lay=Web&-max=15&Property+Code.op=eq&Property+Code=572&-find [query] => [errorCode] => 502 [valueLists] => Array ( ) ) When I try the URL myself, there is no error. How/why could FX generate this error itself? Does anyone have any ideas? Cheers.
Charlie Boisseau Posted December 22, 2004 Author Posted December 22, 2004 I've fixed it - the problem was in the FX.php file. Basically, I sourced the problem when I looked at the local web server logs. I saw a whole load of POST requests coming from my ISP web server (where the PHP is running from) and a load of GET requests coming from me directly. I noticed that the POST requests were only returning around 400 bytes, whereas the GET requests were returning over 4000 bytes. This lead me to believe that the FileMaker server doesn't like POST requests. Having looked through the FX.php file, I saw there was a variable called $isPostQuery. Initially (on line 103) the variable is set to false, however on line 187, in the 'ClearAllParams()' function the value was being set to true: $this->isPostQuery = true; I changed this to false, to ensure that FX was performing GET requests and now it seems to work fine. I don't know why the FM Server didn't accept the POST request - whatever it is, it's a problem within FX.php. I'll email the author to let him know of the bug.
Recommended Posts
This topic is 7346 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now