9 Replies Latest reply on Feb 20, 2014 10:34 AM by davidwheelock

    FMS13 upgrade breaks FX.PHP query

    davidwheelock

      Hi All, I posted this yesterday on FM Forums, so please pardon the duplication.

       

      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 ------------------

       

       

        • 1. Re: FMS13 upgrade breaks FX.PHP query
          ghoffman

          Just a couple of suggestions in your login info:

           

          FMS 13 seems to prefer https connections. In your login string, check to see if $serverIP has a secured URL.

          Also, be sure $scheme is FMP12 rather than FMP7. Sometimes FMP7 works when accessing FMP12 databases, but it's better to use FMP12.

           

          Gary

          • 2. Re: FMS13 upgrade breaks FX.PHP query
            iamsloper

            Hey David,

             

            What version of FX are you using? If you were using 4.2, then you should go to 6.0. You will also need to change the $dataSourceType config field.

             

            Change from $dataSourceType = 'FMPro7' to $dataSourceType = 'fmalt'

             

             

            Hope this helps,

             

            Michael

            • 3. Re: FMS13 upgrade breaks FX.PHP query
              matsuo

              Please use the latest FX.php on GitHub, updated on Dec 2013 to fix compatibility with FileMaker Server 13.

              https://github.com/yodarunamok/fxphp

              • 4. Re: FMS13 upgrade breaks FX.PHP query
                davidwheelock

                Thanks Gary, Michael and Atsushi for your responses. Here's what I've tried so far . . .

                 

                Per Gary:

                -- I changed the $dataSourceType from 'FMPro7' to FMPro12'

                -- Tried using SSL in portt 443. This took some additional troubleshooting because the client's IT guy was ussing port 443 to administer a QNAP. But, after clear that situation up, the symptoms were basically the same as on port 80.

                 

                Per Micael:

                -- Yes, I am using fx.php 6.0

                -- Changing the dataSourceType to 'fmalt' caused a PHP in line 305 of FX.php. I can't seem to find any documentation supporting 'fmalt'. What is it? See below for what is in the documentation related to datatypes.

                 

                And, Atsushi:

                -- I downloaded the latest version from github, but it seems to be the same version (6.0) that I had before, with a date of 3 Feb 2012. I used the .zip download link. Is this the correct one?

                 

                Again, I appreciate the help.

                 

                Cheers!

                 

                Dave Wheelock

                 

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

                 

                var $dataServerType = 'xxxx';

                 

                Where 'xxxx' is the parameter from the list below corresponding to your data source.

                 

                The possible values for this parameter (case is not important) are:

                 

                FMPro5/6 - for FileMaker version 5 thru 6 databases.

                 

                FMPro7 - for FileMaker 7 Server Advanced data sources.

                 

                CAFEphp4PC - when using FMWebschool's CAFEphp to connect to FileMaker client on the PC.

                 

                ODBC - to connect to an ODBC data source.

                 

                OpenBase - if connecting to an OpenBase data source.

                 

                MySQL - if connecting to a MySQL data source.

                • 5. Re: FMS13 upgrade breaks FX.PHP query
                  shslawinski

                  I have just updated to Filmaker 13 and the from the php has broken to my database.

                   

                  I am deserpately looking for help as it is the weekend and none of my tenants can access the form hosted on our webpage. 

                   

                  The message that follows when trying to get to the form on line is...

                  The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

                   

                  What do I need to change in that coding?? Help please!!

                  • 6. Re: FMS13 upgrade breaks FX.PHP query
                    TimGriffith

                    Read the stuff above, in particular...

                     

                    Please use the latest FX.php on GitHub, updated on Dec 2013 to fix compatibility with FileMaker Server 13.

                    https://github.com/yodarunamok/fxphp

                    • 7. Re: FMS13 upgrade breaks FX.PHP query
                      matsuo

                      Hi David,

                       

                      The version number of FX.php on GitHub is still 6.0, not updated.

                      But the content of FX.php on GitHub has been improved a lot after releasing FX.php 6.0.

                      • 8. Re: FMS13 upgrade breaks FX.PHP query
                        shslawinski

                        does the new version overwrite the mail config?  Im not sure what is missing. Should I unistall 13 and go back to 12? I am in bit of a rut because my php guy is MIA and its still down.

                        • 9. Re: FMS13 upgrade breaks FX.PHP query
                          davidwheelock

                          Thanks to all for adding to this discussion.

                           

                          I was never able to resolve the issue, or even change the symptoms using FX.PHP.

                           

                          I endded up switching to the FileMaker PHP API, and everything works as it did before we upgraded to FMS13.

                           

                          Cheers!

                           

                          Dave W