Can you *set* Apache credentials from PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deane

    #1

    Can you *set* Apache credentials from PHP?

    Is it possible to *set* Apache credentials via PHP? I know you can
    read Apache credentials from PHP, but I want PHP to tell Apache that a
    session is authenticated.

    Essentially, I want to do with an HTML form what Apache accomplishes
    with a pop-up window.

    Why? Because in addition to authenticating them, I need some other
    information, and having (1) a pop-up window that auths them to Apache,
    then (2) an HTML form to capture the additional info, would be awkward
    from a usability perspective.

    Deane

  • Gordon Burditt

    #2
    Re: Can you *set* Apache credentials from PHP?

    >Is it possible to *set* Apache credentials via PHP? I know you can
    >read Apache credentials from PHP, but I want PHP to tell Apache that a
    >session is authenticated.
    You cannot set credentials in Apache. You set credentials in a browser,
    which presents them to Apache (and eventually to PHP).
    >Essentially, I want to do with an HTML form what Apache accomplishes
    >with a pop-up window.
    Apache does not do pop-up windows. Browsers do pop-up windows.
    >Why? Because in addition to authenticating them, I need some other
    >information, and having (1) a pop-up window that auths them to Apache,
    >then (2) an HTML form to capture the additional info, would be awkward
    >from a usability perspective.
    Information you can set in a browser include cookies, parameters on a URL,
    and indirectly you can use session data.

    Comment

    • Jerry Stuckle

      #3
      Re: Can you *set* Apache credentials from PHP?

      usenet@isotopeR EEMOOVEmedia.co m wrote:
      On Fri, 06 Jul 2007 20:40:34 -0000, Deane <deane.barker@g mail.comwrote:
      >
      >Is it possible to *set* Apache credentials via PHP? I know you can
      >read Apache credentials from PHP, but I want PHP to tell Apache that a
      >session is authenticated.
      >>
      >Essentially, I want to do with an HTML form what Apache accomplishes
      >with a pop-up window.
      >>
      >Why? Because in addition to authenticating them, I need some other
      >information, and having (1) a pop-up window that auths them to Apache,
      >then (2) an HTML form to capture the additional info, would be awkward
      >>from a usability perspective.
      >
      Check out http://us.php.net/features.http-auth
      Did you actually read this? It doesn't do anything like what he wants.

      That's because it can't be done. Authentication/Authorization is
      strictly between the browser and the webserver. PHP doesn't get
      involved at all.

      However, you can create your own authentication mechanism using session
      and collect and store whatever data you want. It's pretty easy, really.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      Working...