Atom Publishing Protocol

From Habari Project

Jump to: navigation, search

PHP running as CGI

If you are running PHP as CGI, the HTTP authorization will not work. Here's the alternative:

Add this line in your .htaccess

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Add this lines to `atomhandler.php` on line 29

if ( isset( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) && !empty( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) )
{
	$hash= base64_decode( substr( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6 ) );
	list( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] )= explode( ':', $hash );
}
Personal tools