1 Reply Latest reply on Aug 6, 2012 2:06 AM by steve.winter

    Deprecation warnings being thrown by FM 12 API for PHP

    TimDietrich

      I was in the process of moving a client's Web application to a new server, when I ran across this error:

       

      "Deprecated: Assigning the return value of new by reference is deprecated in /FileMaker/Implementation/Parser/FMResultSet.php on line 65"

       

      The messages being thrown by PHP were coming directly from the API, which was a little worrisome. I confirmed that I am running the latest version of the API, and the version of PHP that I'm running is 5.3.10.

       

      My fix for this was to silence the messages being thrown by the API. I did this by placing an "@" sign in front of the call to include / require the API, like this:

       

      // Include the FileMaker API for PHP.

      @require_once("FileMaker.php");

       

      This Web app is hosted on a Web server that is different than the server that the FileMaker databases are hosted on - which is probably why I was seeing the error. My guess is that the flavor of PHP installed with FileMaker Server would prevent these messages from being displayed.

       

      -- Tim

        • 1. Re: Deprecation warnings being thrown by FM 12 API for PHP
          steve.winter

          Hi Tim

           

          Deprecation warnings in the FM API have been a long-standing annoyance - they fixed almost all of them in the FM12 release, and I am lead to understand that when the v2 for FM12 Server comes out that last remaining one will have been caught too...

           

          It's not so much about the version of PHP because the issue was deprecated quite some time ago - the reason you'll not have seen them previously is most likely because deprecation errors were turned off in the php.ini file on previous servers you've worked on...

           

          Your solution of supressing errors when loading the API is one (suitable) solution, the other is modify the ini file...

           

          HTH

           

          Cheers

          Steve