1 Reply Latest reply on Jun 27, 2011 3:52 PM by AndyJohnson

    How does PHP authentication work?



      How does PHP authentication work?

      Your post

      Hi there,

      I'm confused about how to make web authentication work with the php web publishing engine in FMS11.  I want FMS11 to authenticate various different users.  So I created accounts in the db with passwords with the various privileges:

      [Guest]  - [Data Entry Only]

      Worker - [Read-Only Access]

      Admin - [Full Access]

      and the fmphp extended privilege is set for all three - [Full Access], [Read-Only Access], [Data Entry Only]

      It looks like the fmphp extended privilege has to be turned on for anything to work.  But if I allow [Guest], then anyone can access the database and view, search, delete, and edit the records as they see fit without entering a password even though [Guest] is set at [Data Entry Only].  (why is this?) On the other hand, if I disable [Guest], then the "home" page appears blank as if the php engine encountered an error.

      I'm using the FM PHP Site Assistant to create my pages but it looks like I'm going to have to learn a bunch of PHP.  Do I have to disable [Guest] and add some authentication code on the "home" page?  If so, where do I learn the syntax for prompting and sending authentication to FMS?

        • 1. Re: How does PHP authentication work?

          It seems that I had to ask the question in detail before finding the steps to an answer.

          The scheme that I have figured out so far is this:

          1) Use Manage Security to set up accounts that do the various functions

          2) Disable [Guest]

          3) Then create the site using PHP Site Assistant. When it sees that [Guest] is disabled it will automatically prompt for your admin password and create pages that look for authentication.  If [Guest] is enabled it doesn't give a peep about this capability.

          My problem was that I had created my site pages when the DB had [Guest] enabled, thus the site assistant hadn't put in any code for authentication. So I had to start over with the site assistant in order to get the authentication stuff.

          4) BTW see the note at http://help.filemaker.com/app/answers/detail/a_id/6617/~/php-site-assistant-authentication-security-issue

          5) please explain to me what the heck I'm doing working on this stuff before I even know squat about php.

          By the way, does anyone know how to create new site templates for Site Assistant?