madimax Posted January 10, 2015 Share Posted January 10, 2015 Hello, i have a problem on a prestashop 1.6 and on a OVH mutualise server I want to acces th webservice api on navigators but authentification loop and doesn't work it always ask me the password, it works on other server or hoster, like on PHPNET and LWS but not on OVH The $_SERVER['PHP_AUTH_USER'] and $_SERVER['HTTP_AUTHORIZATION'] are always empty FCGI is activated, with PHP 5.4 the conf of prestashop webservice is good Any Idea ? thank you Best Regards Link to comment Share on other sites More sharing options...
NemoPS Posted January 10, 2015 Share Posted January 10, 2015 Since it works on others, did you try asking ovh about it? Link to comment Share on other sites More sharing options...
madimax Posted January 10, 2015 Author Share Posted January 10, 2015 Hello yes i called ovh, i have explained them but they told me they can't do anything.... Link to comment Share on other sites More sharing options...
madimax Posted January 10, 2015 Author Share Posted January 10, 2015 i have solved my problem! Create an htaccess in webservice folder with (créer un fichier .htaccess dans le dossier webservice) : <IfModule mod_rewrite.c>RewriteEngine onRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]</IfModule> and in webservice/dispatcher.php add (dans webservice/dispatcher.php ajouter) : if(strpos(@php_sapi_name(), 'CGI')){list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));}; Good luck! 1 Link to comment Share on other sites More sharing options...
Recommended Posts