1 Reply Latest reply on Jan 23, 2014 2:35 PM by TSGal

    FMS 13/PHP API PHP Strict Standards Errors

    databuzz

      Summary

      FMS 13/PHP API PHP Strict Standards Errors

      Product

      FileMaker Server

      Version

      13.01

      Operating system version

      10.9.1

      Description of the issue

      After upgrading from FileMaker Server v12 to v13 we tested some Custom Web Publishing sites using the PHP API and noticed a lot of new error messages in the apache error log like the following:

      [Thu Jan 23 23:10:57 2014] [error] [client ::1] PHP Strict Standards:  Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in /Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/FileMakerImpl.php on line 259,

      There's dozens of these and they all refer to a method I've used for many years to check for errors, e.g.:

        if(FileMaker::isError($layouts)) {
                    // FileMaker PHP API Error -- Alert User.
                          $error = 'Authentication Error: '. $layouts->getMessage(). ' (' . $layouts->code . ')

      ';
                          } else {
                          $error = '';

      It's referencing the first line in the error log:  if(FileMaker::isError($layouts)) {.

      Steps to reproduce the problem

      1. Install FileMaker Server v13
      2. set a PHP API site
      3. in one of your PHP pages check for an error, e.g.  if(FileMaker::isError($layouts)) {
      4. check the Apache error log for a PHP Strict Standards entry

      Expected result

      No PHP Strict Standards entry in the Apache error log

      Actual result

      Entry in the Apache error log like this:

      [Thu Jan 23 23:10:57 2014] [error] [client ::1] PHP Strict Standards:  Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in /Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/FileMakerImpl.php on line 259,

      Exact text of any error message(s) that appear

      [Thu Jan 23 23:10:57 2014] [error] [client ::1] PHP Strict Standards:  Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in /Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/FileMakerImpl.php on line 259,

      Configuration information

      Using the FileMaker Server supplied version of PHP

        • 1. Re: FMS 13/PHP API PHP Strict Standards Errors
          TSGal

               databuzz:

               Thank you for your post.

               With Mac OS X 10.9.x, you may now see "PHP Strict Standard" or "PHP Notice" error messages.   To remove these error messages, edit the PHP.ini file and set the following:

               error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT& ~E_NOTICE

               After editing the PHP.ini file, you must restart the web server.

               This issue also occurs in FileMaker Server 12, and this is also talked about in the latest FileMaker Server 12.0v6 update that supports Mavericks.  See Knowledge Base Article #13131 for more information:

          http://help.filemaker.com/app/answers/detail/a_id/13131

               TSGal
               FileMaker, Inc.