MortenKL Posted February 19, 2015 Share Posted February 19, 2015 I have been wondering a bit about this. What does "Enable CGI mode for PHP" have to do with Prestashops Webservice and why is it specific to the webservice page ? On some hosts, I find that everything works fine, except for the webservice. If I try to access the API through the browser (or any other way for that matter), The API constantly asks for an authentication token (webservice key), even though I provided it with the correct key once. This behaviour goes away if I choose to "enable CGI mode for php". Im not even sure that the hosting provider uses CGI mode, in most cases I have no way of knowing (if I dont ask the hosting provider, that is). Well, just wondering, and could not find any obvious reason. Cheers Morten Link to comment Share on other sites More sharing options...
a_smith Posted June 12, 2015 Share Posted June 12, 2015 Same question here. I do understand what CGI is and I do know my host config. But I wonder what this trigger does in terms of Presta functionality... Link to comment Share on other sites More sharing options...
884483048 Posted May 9, 2018 Share Posted May 9, 2018 (edited) In my cause turnig this option ON speedups slightly the shop, Presta 1.7.3.2 hosting is a VPS php70 FPM/FastCGI enabled Edited May 9, 2018 by 884483048 (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted May 10, 2018 Share Posted May 10, 2018 The option is associated with this variable in the PS code 'PS_WEBSERVICE_CGI_HOST' And searching all of the PS code for the usage of 'PS_WEBSERVICE_CGI_HOST', turns up only the following code in the Tools class. This adds a rewrite rule to the htaccess file if (Configuration::get('PS_WEBSERVICE_CGI_HOST')) { fwrite($write_fd, "RewriteCond %{HTTP:Authorization} ^(.*)\nRewriteRule . - [E=HTTP_AUTHORIZATION:%1]\n\n"); } You will have to do some additional research if you want to know what that rule actually does 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now