title: FreeRadius + PHP Configuration
body: <p>I'm trying to configure FreeRadius to authenticate using a PHP script. I've been messing around trying to get it to get the server to authenticate based on the script, but I can't find much documentation on doing it that way. </p>
  
  <p>This is what we're trying to configure. </p>
  
  <p>We have a web server, that has a Wordpress site installed on it with thousands of users. We're wanting to install a WiFi service at certain locations that uses FreeRadius for authentication and we want it to allow users that are signed up on the Wordpress site to use their credentials. </p>
  
  <p>The problem I'm facing right now is that I can't seem to get FreeRadius to authenticate based on the PHP script. </p>
  
  <p>This is what I've configured thus far based on other StackOverflow posts have mentioned with their configuration. </p>
  
  <p>I've created the following file in <code>/etc/modules/php</code> and added this</p>
  
  <pre><code>exec php {
      wait = yes
      program = "/usr/bin/php -f /etc/raddb/myscript.php"
      input_pairs = request
      output_pairs = reply
  }
  </code></pre>
  
  <p>In <code>/etc/raddb/sites-enabled/default</code> I've added the following:</p>
  
  <pre><code>authenticate {
    Auth-Type PHP {
      php
    }
  }
  </code></pre>
  
  <p>In <code>/etc/raddb/users</code> I've added the following line to the end</p>
  
  <pre><code>DEFAULT Auth-Type := PHP
  </code></pre>
  
  <p>In terms of the <code>myscript.php</code> file, I've added responses just to see what I could get and printed "Access-Accept" or "Access-Reject" to see if it would give me any clues whether it would authenticate based on those responses, but neither helped.</p>
  
  <p>Any guidance or examples would be greatly appreciated. </p>
  
  <p>Also, I've tried the method listed here: <a href="https://stackoverflow.com/questions/9542268/freeradius-and-php-auth-script">Freeradius and PHP auth script</a> to no avail. </p>