My Web host is running PHP as a CGI, so I don't have PHP hooks into Apache authentication.
I have a private directory on my site where I run test files and some private applications. It's password-protected with an .htaccess file that restricts access to authorized users.
I'm trying to run a test program in this directory that contains a form. When I access the page with the form, I get a dialog asking for a username and password, which I enter. The form action specifies another .PHP file in this private directory. When I click Submit, I get an authorization error. Apache is not prompting me again for a username and password, and my browser is not sending the cached authentication information. If I hide/delete the .htaccess file I can submit the form, but I really want to restrict access to this file.
How can I tell Apache that I am authorized to access this file? If the PHP installation wasn't CGI then I could use the PHP hooks, but that is not available to me.