Prestashop 1.7 Webservice Bug Amazon EC2 img

I tried everything, I searched for more than 30 hours - I did several instances to test and nothing solved. I do not know what’s up, it does not make sense. I made changes to htaccess.conf, .htaccess, I changed permissions for Putty and nothing.

I’ll make a key with just “Get” if someone wants to look.

I also updated the prestashop - I had to change the permissions to 777

So, Thank for your attention - Below I’ll let all information about my test instance. Best Regards.

http://ec2-54-86-156-29.compute-1.amazonaws.com/api
/webservice/dispatcher.php

Extra information:

Enable PrestaShop’s webservice (CHECK)
Enable CGI mode for PHP (CHECK also tried without)

Image https://aws.amazon.com/marketplace/pp/B00NPHLR4I?qid=1487023918001&sr=0-2&ref_=srh_res_product_title

My URL >>>>> /info.php (just to avaluation this moment)

VERSION COMPARISON
PrestaShop Original version:
2 file modifications have been detected, including 2 from core and native modules: See or hide the list

CORE FILE(S) (2)

modules/ps_legalcompliance/config.xml
modules/ps_legalcompliance/ps_legalcompliance.php

Differences between versions:
0 files will be modified, 0 files will be deleted (if they are found). See or hide the list

Your current PrestaShop version : 1.7.0.5 (tried also with the deafult)

Latest official version for major channel. : 1.7.0 stable - (1.7.0.5)

Hello @michelconrado

Firstly I want to point out that I edited your previous comment because you should never share on a public channel like this any Key.

Secondly, I am afraid that I don’t understand what the issue is. What is the bug you are talking about? Is there any functionality not working on your PrestaShop Cloud Server? What was your purpose when you start editing the Apache file you mentioned?

Best Regards,

Juan Ariza

1 Like

I think I wrote it less explicitly because it seemed kind of obvious. So the problem is that when trying to access the API through the links indicated in the PrestaShop documentation. It does not come in, it’s all right and yet it does not complete the call. When placing the key the server asks again for the key. Not only in the browser, but also in the Advanced Rest API and the application I’m working on.

And I also thought it was something related to rewriting and that’s why I made changes to htaccess.conf, .htaccess, Based on problems similar to mine.

I published the key because it is a test key, I am studying how to use the API in another activity. This image will be destroyed later.

Best Regards.

Hello @michelconrado,

You mentioned:

Did you follow our documentation for the upgrade? If so, we’d like to know where did it fail, so that we can improve it.

Regarding the issue with the webservice, we’ve been able to reproduce the issue. We’ve also found this issue in Github mentioning the same problem. We’ll look into it to ensure it’s not a problem in our configuration.

The workaround mentioned in the issue seems to work. In order to apply it, edit /opt/bitnami/apps/prestashop/conf/htaccess.conf and add the following line after the one with the first RewriteCond statement (line 8):

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

Restart Apache afterwards:

sudo /opt/bitnami/ctlscript.sh restart

Hope it helps.

Best regards,
Alvaro Recio

1 Like

Well, I did this before 3 times. That’s the 4th.

Did you follow our documentation for the upgrade?

Yes, everything works very well - But the Webservice doesn’t.

you said > we’ve been able to reproduce the issue.`
So did worked for you?

Also I was able to change the domain using the htaccess.conf and disabling “bnconfig.disable” - Perfect.

I’m think it would be something related with my, region? (Brazil/Bahia)
Maybe is something about cookies - I tried to change the Time of the instance, but no positive results.
I cleared all my caches (DNS, Chrome, Ccleaner) and nothing.

By the way - I’m using cloudflare. (But not in this last instance / case)

Thanks!!

Best Regards.

Well well well my Dear Holmes! It works!

So the problem was that I was inserting the code in a line far below line 8 - So the position of the code matters! It seems to be a condition, as my htaccess.conf has this RewriteRule line inserted. I just would never figure out it was about position condition!

Hi,

We are glad that you were able to fix the issue.

If you have any other question, please don’t hesitate to ask.

Best regards,
Alvaro Recio

Hi Alvaro,
why this “hack” is not part of latest PrestaShop image?

I was not able to access webservice in version 1.7.2.2 and with line:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
in .htaccess (after restart of apache) all works.

Why is not standard part of the delivery?
Or part of key configuration step in manual:
https://docs.bitnami.com/aws/apps/prestashop/configuration/

Thanks for help to others
Petr

Hi @ing.petr.muller,

Thanks for using Bitnami. This thread is quite old, and many things may have changed both in Prestashop and our Apache configuration. Can you open a new thread in the forum adding as much information as possible? Our team is actively monitoring the forum and will be glad to help you.

We will close this thread.

Best regards,
Gonzalo