2 Replies Latest reply on Sep 11, 2014 11:34 AM by DaveWasmuth

    HTTP error 401 using PHP API after FM Server upgrade to v13

    DaveWasmuth

      Summary

      HTTP error 401 using PHP API after FM Server upgrade to v13

      Product

      FileMaker Server

      Version

      13.0.3

      Operating system version

      Windows 2008 Enterprise Edition SP1r2

      Description of the issue

      We have some automated scripts on Linux that import data to and export data from a FileMaker Server hosted database (UserID) using the PHP API.  We recently upgraded the FileMaker Server from version 11 to 13.  The PHP API interface now receives the following when trying to connect to the FileMaker file UserID:

      Communication Error: (22) The requested URL returned error: 401 - This can be due to an invalid username or password, or if the FMPHP privilege is not enabled for that user.

      Steps to reproduce the problem

      Used a test PHP script that uses the PHP API to instantiate a connection to the FM Server and UserID database that calls the listDatabases() method on the server and the listLayouts() method on the database file.

      Tried with existing accounts, newly created accounts and various combinations of the extended privileges and user/password (no password, no space in the user name, guest user, etc.), using the UserID database and the FMServer_Sample database. 

      BTW, our server only allows connections via HTTPS.

      Expected result

      Able to execute the listLayouts() method on the database with the correct user/password combination and the fmphp privilege for that user.

      Actual result

      Finally got listLayouts() to work on the sample database using the guest user.  Great.  Went back to UserID and tried the guest user, which also worked.  Went back to sample database, created a new user that wasn't anonymous (guest) and disabled guest, then tried the listLayouts() test script on the sample database with the correct user/password combination and the fmphp privilege.  Again with the 401, so it seems to be all databases, not the account configuration on UserID.

      Exact text of any error message(s) that appear

      see above for error text.  Here is what we see in the log:

      2014-08-22 17:07:55 -0700 128.114.113.50     128.114.112.37:62861     -     -     ERROR     HTTP:401     0     "/fmi/xml/fmresultset.xml?-db=UserID&-layoutnames"

      Configuration information

      Is there any more detailed configuration for the FileMaker server or webserver, aside from the enabling of Custom Web Publishing flavors in Admin Console that might come into play here?

      Workaround

      Have to do manual imports and exports, which is error prone, or give an anonymous login write access to the database.

        • 1. Re: HTTP error 401 using PHP API after FM Server upgrade to v13
          TSGal

               Dave Wasmuth:

               Thank you for your post.

               We have had several customers contact our Technical Support department with Windows Server 2008 Enterprise unsuccessfully installing and deploying FileMaker Server 13.  This is the reason why Windows Server 2008 Enterprise is not a supported operating system for FileMaker Server 13.

               Do you have access to another server that meets one of the followingsystem requirements?

                  Windows 8 Pro (64-bit)
                  Windows Server 2012 Standard Edition (64-bit)
                  Windows Server 2008 R2 SP1 (64-bit)
                  Windows 7 Professional Edition SP1 (64-bit)
                  OS X Mavericks v10.9.x
                  OS X Mountain Lion and OS X Mountain Lion Server v10.8.5

               TSGal
               FileMaker, Inc.

          • 2. Re: HTTP error 401 using PHP API after FM Server upgrade to v13
            DaveWasmuth

            I had not updated my FileMaker PHP API on the Linux client side, and it looks like the PHP API for version 13 uses a different authentication method than the old API.  Updating the API fixed the HTTP 401 issue.  Now I am running up against a 2 minute timeout.  I will post a different forum thread for that.

            Cheers,

            Dave