[fx.php_list] Re: Diagnosing an FX_Error ?

  • From: Chris Hansen <chris@xxxxxxxxxxx>
  • To: fx.php_list@xxxxxxxxxxxxx
  • Date: Fri, 7 Apr 2017 10:16:50 -0600

Hey Troy,

I've seen that one from time to time. Basically, if FileMaker has any
sort of problem returning the requested data, it returns an HTML error
page (not valid XML). The XML parser in FX.php doesn't like this. The
page in question could be a 404, for example, or an authentication
error. I'm working on updating FX.php, and this is something that I
should handle more gracefully, since FMS doesn't.

Best,

--Chris


On 4/6/17 7:18 PM, Troy Meyers wrote:

To try to identify when something goes wrong, at the top of all of my 
FX-reliant PHP pages I've got a series of trials, that is, checking if I can 
get a socket to the WPE, and then next a simple query test:

      //Check if a findany to an available table works
      $pageObj=new FX($dbHost,$port,$dbType,$conType);
      $pageObj->setDBPassword($dbPass,$dbUser);
      $pageObj->setDBData($dbName,$testLayout, 'all');
      $pageData = $pageObj->FMFindAny();
      if ( is_object($pageData) ){
              // Likely an FX_Error if it's an object
              $errordisplay = $pageData->message;
      } else {
              $errordisplay = $pageData['errorCode'];
      }

So, I get the FileMaker errors, but can also get the FX errors.

I've started seeing this one, and I can bring it on by loading a simple page, 
and refreshing it over and over and over until it occurs. Here's the FX 
message=

FX: ExecuteQuery XML error: Invalid character at line 1

Where do I go from here figuring out what's up?

Troy
_____________________________________________________________________
     FX.php Official Web Site -- http://fx.iviking.org/
FX.php Official Mailing List -- //www.freelists.org/list/fx.php_list
     (Subscribe, unsubscribe, and more at the mailing list site!)

                  FX.php_List@xxxxxxxxxxxxxxxx


Other related posts: