Jump to content

  •  

Photo

FMS13 upgrade breaks FX.PHP query


  • Please log in to reply
5 replies to this topic

#1 DaveWheelock  novice

DaveWheelock
  • Members
  • 21 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: 8h 15m 35s

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
  • 9 posts
  • LocationChicago, IL
  • FM Application:12 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Expert
  • Time Online: 2h 45m 53s

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

#5 ZoXo  member

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

Posted 02 September 2014 - 01:40 PM

As relates to FM Server 13 and FX

Further study of this issue has brought about the following:

 

Setting your server_data.php file in FX:

 

For some reason the only way I could get it to work was by entering the data as follows:

 

$serverIP = localhost ;

 
$webCompanionPort = 80 ;
$dataSourceType = FMPro7 ;
 
//$webUN = ‘’;
//$webPW = ‘’;
 
$scheme = http;
 
notice the absence of the single apostrophes around the variable values
since I am not a PHP expert, I am going to assume that variables should no longer use quotes of ANY kind????
 
This has at least gotten me to the point of being able to retrieve the XML needed to continue the process, however
the XML issue is still not solved.
 
Progress updates to come, as I am now tackling this issue until it is resolved.

  • 0

#6 Bob Minteer  novice

Bob Minteer
  • Members
  • 21 posts
  • LocationDallas, TX
  • FM Application:12 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Membership:TechNet
  • Time Online: 7h 35m 47s

Posted 13 September 2014 - 05:08 PM

I fought with this too.   I held off upgrading my solutions' server to Filemaker Server 13 because I was unable to get my web portal, which depends upon FX.php, to work.  

 

I'd even tried the latest master from the Github repo ( https://github.com/yodarunamok/fxphp ).   Didn't work.  

 

I was looking at the repo and noted that Atsushi Matsuo had forked and made some changes in his INTER-Mediator branch at Github ( https://github.com/m.../INTER-Mediator ). 

 

This worked!

 

He had made some changes to the RetrieveFM7VerboseData class which seems to have fixed the problem for me.   I have been testing this on a virtualized Windows 2008 development server running FMS13.   If all of my regression testing works out, I will upgrade my production system tonight.


  • 0




FMForum Advertisers