Jump to content

automatic Apache authentication for local PHP scripts?


Haerta

Recommended Posts

Hello!

 

I have a .htaccess protected <directory>, that needs a username/password to be opened.

 

I want all local php scripts to be able to scan this directory or to load data from it?

 

how can i do this?

 

I tried to use PHP: apache_setenv(_local_, \"\") function with the directive: allow from env=_local_

but this function is known to be infunctional (apache crashes on my machine, no matter what env_variable I want to define)

 

I tried to use

SetEnvIfNoCase SCRIPT_FILENAME \"SetEnvIfNoCase SCRIPT_FILENAME \"H:/_webroot_/test.php\" _local_

with

allow from env _local_ but access is denied but the ouput of $_SERVER[\'SCRIPT_FILENAME\'] is \"H:/_webroot_/test.php\"!

 

Is it possible to use PHP: apache_note() for this purpose? I can\'t find any suitable information about how to read the notes with apache.

 

thx for any reply.

 

machine: windows XP Pro, Apache 2.43, PHP 4.32

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.