Jump to content

FMS13 upgrade breaks FX.PHP query


This topic is 3505 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 ------------------
 
 
Link to comment
Share on other sites

  • Newbies

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:

 

Link to comment
Share on other sites

  • Newbies

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.xx:80/fmi/xml/FMPXMLRESULT.dtd">

 

FileMaker 13:

 

<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "http://localhost:16020/fmi/xml/FMPXMLRESULT.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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 7 months later...

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.
Link to comment
Share on other sites

  • 2 weeks later...

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/matsuo/fxphp/tree/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.

Link to comment
Share on other sites

This topic is 3505 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.