2 Replies Latest reply on Feb 2, 2011 5:51 PM by zayscott

    Access denied (php publishing)



      Access denied (php publishing)

      Your post

      I created a site using the php site assistant, but when I try to add new records to the database I get a access denied error. I know that is happening because the database is protected. How I do configure the php site to use credentials that are authorized to access the database?

        • 1. Re: Access denied (php publishing)

          Hello Zay,

            There are 2 possibilities for this:  the extended privileges and the FileMaker() object.  If, for example, you have a user named 'Joe' and his privilege set is 'staff' then you first need to make sure that 'staff' has the fmphp Extended Privilege assigned to it.  For FMP 11, go to File->Manage->Accounts & Privileges and look at the Extended Privileges pane.  The priv set you are using should be listed for the fmphp extended privilege.  In my example, you would see a line like:

          Keyword     Description                                Used by Privilege Set


            fmphp     Access via FileMaker PHP API          staff

            Since you are using the site assistant, this is probably the reason.  If you were writing your own PHP, then you need to make sure to use teh correct username/password when creating the FileMaker() object.  For example:

          // build the FileMaker staff object 

          $fm = & new FileMaker(); 



          $fm->setProperty('username', 'Joe'); 

          $fm->setProperty('password', 'SecretWord');



          • 2. Re: Access denied (php publishing)

            Hey Derek, thanks for responding, but I figured out my issue. I needed to disable the guest account so that when the php assistant was creating the site, it would give me the option to have the site created with the username preconfigured or be prompted at logon. I am still to award you for responding.