Basic HTTP Auth Fails - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Update/Upgrade (/forum-44.html) +--- Thread: Basic HTTP Auth Fails (/thread-6152.html) Pages: 1 2 |
RE: Basic HTTP Auth Fails - joximu - 04-02-2009 09:54 PM Hi all I searched the net and it seems that its possible to get a functional Basi HTTP Auth together with Fastcgi (I could not test with fcgi!). Change the /etc/apache2/mods_enabled/fastcgi_ispcp.conf, the FastCgiConfig Parameters (the "-pass-header" especially): Code: FastCgiConfig -minProcesses 1 \ -pass-header HTTP_AUTHORIZATION with: -pass-header Authorization in PHP - you have to add this before using the $_SERVER['PHP_AUTH_*'] Variables: Code: if (isset($_SERVER['Authorization']) && !empty($_SERVER['Authorization'])) { This works for me - the installation is an very old upgraded RC7 but should work also for other fastcgi installations... Cheers Joxi RE: Basic HTTP Auth Fails - pongraczi - 06-25-2009 07:01 AM (04-02-2009 09:54 PM)joximu Wrote: This works for me - the installation is an very old upgraded RC7 but should work also for other fastcgi installations... Hi Joxi, Are there any similar solution for fcgid? I use fcgid and I have an issue to get working the webdav interface of egroupware 1.6.x. I got a neverending basic authentication popup and it seems, it cannot make a session. Anyway, except this, egroupware is working well on ispcp. Thanks, István RE: Basic HTTP Auth Fails - joximu - 06-25-2009 08:17 AM sorry - I use fastcgi and therefore cannot test this. did you goolge for "pass-header authorization fcgid"? /J RE: Basic HTTP Auth Fails - pongraczi - 06-25-2009 08:29 PM I googled around a little bit, but no breakthrough yet. RE: Basic HTTP Auth Fails - kilburn - 06-25-2009 11:25 PM To enable authorization under fcgid, you only have to edit it's configuration file /etc/apache2/mods-enabled/fcgid_ispcp.conf, adding a line like this: Code: PassHeader AUTHORIZATION After that, you can use the following snippet to populate $_SERVER variables with the user supplied values, and work from here PHP Code: list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['AUTHORIZATION'], 6))); Cheers! |