Hi. I created a handler in my .htaccess file that runs a php script to authenticate users for all documents below a directory. It pops up an apache username/password window and then compares the credentials to a username/password file. If it passes, then a session cookie is written to the browser. If it fails, a counter is updated in the user file and they are authenticated again. After 5 times, they are locked out. This works fine for HTML files. However, there are php files in that directory too. This is where I have an issue. In my PHP code I just take the originally requested file and print it out by doing readfile(). If I do this to a PHP file, it tries to print to the browser without actually running the php. Basically attempts to print the code to the browser instead of running it. I tried many ways of outputting the data from the PHP but it does not work. Can any suggest a way to have this code do authentication and then pass back control to apache to handle/translate the document? Or maybe another suggestion to make this work? The reason I did it this way is because we have a third party product that pings the server constantly to show "real-time" status. This causes authentication every time and causes the user file to be in a read state at all times. When a real user goes to log in, they can potentially get locked out, especially when many users are on the site...or if two people are on the real-time page. We were using mod_auth, which controlled the authentication. I thought writing this quick php would fix it but I ran into the issue above. Thank you for any help.