Jump to content


Photo

automatic Apache authentication for local PHP scripts?


  • Please log in to reply
No replies to this topic

#1 Haerta

Haerta
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 02 September 2003 - 09:16 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users