From my favourite PHP website:

Prerequisites

The $PHP_AUTH_USER, $PHP_AUTH_PW and $PHP_AUTH_TYPE global variables are only available when PHP is installed as a module. If you're using the CGI version of PHP, you will be limited to Web server-based authentication or other custom types of authentication (such as using HTML forms) to match passwords in a database.


In other words, the CGI version of PHP doesn't allow PHP authentication which, given the limitations of CGI, makes some kind of weird sense!