Jump to content

  •  

Photo

FMS13 upgrade breaks FX.PHP query


  • Please log in to reply
3 replies to this topic

#1 DaveWheelock  novice

DaveWheelock
  • Members
  • 20 posts
  • LocationSurf City, USA
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:8, 10, 11
  • Membership:TechNet, FileMaker Business Alliance
  • Time Online: 7h 53m 46s

Posted 21 January 2014 - 11:19 AM

My client recently upgraded their FileMaker Server, an xServe, to OS X 10.9 and FMS13. As a result, an existing php web site, pulling FileMaker data using fx.php, is now broken.

 

I perform a simple query, looking up a user by their account name. After the upgrade, I am returned 0 records with an error of '4'. The weird part is, when I run my script with debug on, and I manually click on the resulting query URL it works as I would expect. The XML result is the one record I asked for.

 

I can't seem to find other forum posts, from others who have had this issue after upgrading to FMS13. Is anyone aware of any differences in FMS13 which might cause this failure? any thought or suggestions are welcome. Thanks

 

Dave W

 

---- Here's the query ------------------

 

// === GRAB THE LOG IN INFO ===
$_SESSION['account_name'] = $_REQUEST['account_name'];
 
//define("DEBUG", true);
// === required FX files
require_once(/*$_SERVER['DOCUMENT_ROOT'] . */"FX/FX.php");
require_once(/*$_SERVER['DOCUMENT_ROOT'] . */"FX/FX_Error.php");
require_once(/*$_SERVER['DOCUMENT_ROOT'] . */"FX/Developer/FMErrors.php");
require_once(/*$_SERVER['DOCUMENT_ROOT'] . */"FX/server_data.php");
$database = 'MyFile.fmp12';
$layout = 'web_login';
 
// === LOOK UP THE LOGIN INFO ==
 
$login= new FX($serverIP, $webCompanionPort, $dataSourceType, $scheme);
$login->SetDBData($database, $layout);
$login->SetDBPassword($webPW, $webUN);
$login->AddDBParam('login_name',$_SESSION['account_name'] );
$loginresult = $login->FMFind();
 
$resultcount = $loginresult['foundCount'];
$resultdata  = $loginresult['data'];
 
// == ADDED JUST TO HELP DEBUG THIS ISSUE ==
echo $resultcount.' count<br>';
echo $loginresult['errorCode'].' error';
die;
 
------------ End of the query -------------------
 
--------------Here's the result ------------------
 
Accessing FileMaker Server 7+ data.
 
 
0 count
4 error
 

  • 0

#2 AlamarkRef  newbie

AlamarkRef
  • Newbies
  • PipPip
  • 2 posts
  • FM Application:13 Advance
  • Platform:Windows 8
  • Skill Level:Novice
  • Membership:FIleMaker Platinum Member

Posted 29 January 2014 - 08:59 AM

I am experiencing the same issue.  Does anyone have any input on what and how to fix the issue?

 

Here is my function call

 

function get_special_FM($debug = false) {
    $find = initFX('Web - Course Data');
    //$find = initFX('WebCourseData');
    $find->AddDBParam('Special Indicator','Yes');   
    $result = $find->FMFind();
    $errorCode = $result['errorCode'];
    $data = $result['data'];
    if ($errorCode == 0) foreach ($data as $key => $val) return $val;
//  else pre($errorCode,'ERROR');
    return false;
}

 

This is the dump that is returned:

 
topbar.png
cpe_bluebar.jpg
button-cart-view.png
button-checkout.png
Array
(
    [data] => Array
        (
        )

    [linkNext] => 
    [linkPrevious] => /index.php?skip=0&
    [foundCount] => 0
    [fields] => Array
        (
        )

    [URL] => http://XXXXXX:XXXXXX@xx.xx.xxx.xxx:80/fmi/xml/FMPXMLRESULT.xml?-db=CPE+Store.fmp12&-lay=Web+-+Course+Data&-max=all&Special+Indicator=Yes&-find
    [query] => 
    [errorCode] => 4
    [valueLists] => Array
        (
        )

)

If you paste the URL into a browser the result set is correct.

 


  • 0

#3 AlamarkRef  newbie

AlamarkRef
  • Newbies
  • PipPip
  • 2 posts
  • FM Application:13 Advance
  • Platform:Windows 8
  • Skill Level:Novice
  • Membership:FIleMaker Platinum Member

Posted 29 January 2014 - 11:19 AM

I have found some additional information.  From the dump listed above:  if you paste the URL into a browser it will display the correct result.  We have downgraded our filemaker server back to version 12.  Everything is working fine!!!

 

I captured the XML generated from from FileMaker 13 and the XML generated from FileMaker 12 and compared the two files.  There was one major difference in the files:

 

FileMaker 12: (xxx.xxx.xxx.xxx = ipaddress)

 

<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "http://xxx.xxx.xxx.x...XMLRESULT.dtd">

 

FileMaker 13:

 

<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "http://localhost:160...XMLRESULT.dtd">

 

notice how the port # changed between the two versions.  Also the ipaddress was replaced with localhost.


My last post may have stripped the port #s

 

12 = ipaddress:80

 

13 =  localhost:16020


  • 0

#4 ZoXo  member

ZoXo
  • Members
  • 8 posts
  • LocationChicago, IL
  • FM Application:12 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Expert
  • Time Online: 2h 45m 49s

Posted 29 January 2014 - 02:40 PM

Dave,

 

I also experienced a broken solution when FileMaker Server 13 is installed.

 

Download the fx.php from the site again and use those files.  Chris Hansen did do some modifications to the code for

Server 13, but there is not documentation that tells you so.  After I installed the new version I was able to get it working

again.

 

Here is his post:

 

------------

Dan, 

Upgrade your FX.php install.  There was an odd little glitch introduced in FileMaker 13 (a trailing question mark on a POST URL will break things) and FX needed to be tweaked.  Now if only FMI would fix the XML schema they broke in FMS12... ;-) 

HTH 

--Chris Hansen 
  Creator of FX.php 
  "The best way from FileMaker to the Web." 
  www.iViking.org 

------------------

 

He also mentions the XML schema, which may be related to your issue.

 

I also had to edit my php.ini file to allow SSL ( I'm also using swift mailer ).

 

HTH

 

Marc


  • 0




FMForum Advertisers