Jump to content
AndyCZ

Cannot enable SSL - gray button

Recommended Posts

Hi,

my website was hacked last week. Webhosting contacted me, that my domain sending many suspicious  emails so thay blocked all emails from my doamin.

 

I restored backup, upgraded my presta from 1.6.0.9 - > 1.6.1.6, bought SSL certificate.

 

Now I see on hosting SSL is active but I cannot turn it on.

 

I search forum but no solution about this gray button.

 

Please help to avoid being hacked again  :rolleyes:

 

post-821440-0-81350200-1468244555_thumb.jpg

Share this post


Link to post
Share on other sites

above "enable ssl on all pages" you should have the link, as on image below:
UCHbzFa.png

Share this post


Link to post
Share on other sites

I have, but it's gray e.g. not active just like in your picture. I enclosed screenshot on my first post.

Share this post


Link to post
Share on other sites

I have, but it's gray e.g. not active just like in your picture. I enclosed screenshot on my first post.

Please re-read Vekia's comment. You misunderstood it.

Share this post


Link to post
Share on other sites

I apologize, I did not explain correctly..

 

By clicking the link "Please click here to check if your shop supports HTTPS." it throws admin area on https and

 

next clicks just refresh the page but the gray button still remain inactive.

 

Any other idea?

Share this post


Link to post
Share on other sites

to turn on "enable ssl" you have to be logged to back office with secured protocol https.

so, you are? or not?

 

you said something about redirection, you mean that you're redirected from https to http ?

Share this post


Link to post
Share on other sites

Thanks vekia!

When I click the link "Please click here to check if your shop supports HTTPS." it redirects from http -> https and all admin pages stay on https.

Also I just tried log off and then log in back to admin area under https protocol and this button "Enable SSL on all pages" still remain gray.

 

Is there is something on webhosting server they should configure to work it right?

Share this post


Link to post
Share on other sites

i have no idea what's up there. this should work :|

 

facts about ssl options:

  1. to "enable SSL on all pages" it is necessary to "enable ssl" first (screenshot for reference: http://i.imgur.com/WlZX87r.png )
  2. "enable ssl" option is available only if you're logged to shop back office with ssl

i analysed the code of this feature - and from developer point of view this should work properly - and it cant be affected with some modules etc.

 

 

what to do?

  1. if i were you - i will optionally and for test purposes change value of these options in the database.
  2. ps_configuration table, search there for "PS_SSL_ENABLED" and change its value to 1
  3. go back to preferences > general and verify it is enabled and if "enable ssl on all pages" option is enabled too
  4. if not - go back to ps_configuraiton table, search for PS_SSL_ENABLED_EVERYWHERE and change its value to 1
  5. go back to point 3
  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

Wow, many thanks vekia!

 

Option 2 worked! 

 

 

 

But front office not work :(

 

www.website.com redirected you too many times.

ERR_TOO_MANY_REDIRECTS

Share this post


Link to post
Share on other sites
  1. go back to your shop back office
  2. go to preferences > seo & urls

how you configured section " SET SHOP URL"

?

Share this post


Link to post
Share on other sites

how you configured section " SET SHOP URL" ?

 

 

it was www.mydomain.com . I removed www from both SHOP URL and SSL SHOP URL. So only left mydomain.com on both fields.

 

Problem the same.

Share this post


Link to post
Share on other sites

for what domain you bought ssl? for www.domain.com or for domain.com ?

Share this post


Link to post
Share on other sites

it's important because ("domain" in the name is an example)

1) www.domain.com
2) domain.com

are two different domains

 

if you for exmaple bought ssl for www.domain.com, the domain.com will not be secured

on some hosts there is an automatic redirect from non-secured to secured domain - and this can be cause of redirection loop.

 

simply saing,

use correct domain name in seo & urls configuration and remember that www.address.com is not the same as domain addres.com (use there domain that is equal to domain for which you bought ssl certificate)

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks vekia!

 

The ssl certificate I bought is for both domains, e.g. www.example.com and example.com .

 

I see it on my hosting admin area.

 

Any other idea why there is so many redirects?

Share this post


Link to post
Share on other sites

Any other idea why there is so many redirects?

Delete the .htaccess file (or rename it) that is in the root of your store, and then access your back office SEO and URL page and click save.  This should force the .htaccess file to get generated again

 

Also, you never said how many redirects you get.  If you enter put www.domain.com in the domain field, and then someone visits your site using domain.com, at most I would expect...

1) A redirect to www.domain.com

2) A redirect to https://www.domain.com

 

We don't know your store or actual domain, so no one can tell you exactly what your problem is

Share this post


Link to post
Share on other sites

Many thanks all for contribution in my problem expecially vekia! 

 

.htaccess definetelly was re-generated but this did not solve "redirect" problem.

I turned on developer's mode and no error from presta  has been shown, just redirect loop.

 

So yerstarday I contacted hosting provider with the issue above.

 

Today they solve the problem (some configuration on hosting server) and now https works perfect. 

 

The topic can be marked as Solved now.

 

All the best.

Share this post


Link to post
Share on other sites

Just a quick solution:
 

UPDATE ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED";
UPDATE ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED_EVERYWHERE";

 

  • Like 1

Share this post


Link to post
Share on other sites
On 7/12/2016 at 10:37 AM, vekia said:

i have no idea what's up there. this should work 😐

 

facts about ssl options:

  1. to "enable SSL on all pages" it is necessary to "enable ssl" first (screenshot for reference: http://i.imgur.com/WlZX87r.png )
  2. "enable ssl" option is available only if you're logged to shop back office with ssl

i analysed the code of this feature - and from developer point of view this should work properly - and it cant be affected with some modules etc.

 

 

what to do?

  1. if i were you - i will optionally and for test purposes change value of these options in the database.
  2. ps_configuration table, search there for "PS_SSL_ENABLED" and change its value to 1
  3. go back to preferences > general and verify it is enabled and if "enable ssl on all pages" option is enabled too
  4. if not - go back to ps_configuraiton table, search for PS_SSL_ENABLED_EVERYWHERE and change its value to 1
  5. go back to point 3

This is what i did after reading some of your chat..

I login to the back office using https and i was able to enable the button.THanks

Share this post


Link to post
Share on other sites

Hello guys,

I see this post is couple years old already but I have just run into the same issue and was just wondering, how I access the ps_configuration table to update the PS_SSL_ENABLED value?

 

I already found how to add SQL Query in the backoffice of PrestaShop but if I search for ps_configuration it actually doesn't contain any value like PS_SSL_ENABLED and the update commands mentioned here in this topic also doesn't work, it gives me an error "SELECT is not available"

Share this post


Link to post
Share on other sites
On 7/21/2020 at 10:09 PM, JANKKO said:

Hello guys,

I see this post is couple years old already but I have just run into the same issue and was just wondering, how I access the ps_configuration table to update the PS_SSL_ENABLED value?

 

I already found how to add SQL Query in the backoffice of PrestaShop but if I search for ps_configuration it actually doesn't contain any value like PS_SSL_ENABLED and the update commands mentioned here in this topic also doesn't work, it gives me an error "SELECT is not available"

please connect to DB to execute UPDATE, Backoffice could only execute SELECT command,

BTW ps_configuration is default table name, you should use xxxx_configuration, xxx id your table-prefix

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for answer Matt, I have just done it however it didn't help. Still can't enable the SSL for all pages. I can't even login into the backoffice while on https. it just redirects me to the login page at http. and there the option is greyed out. Do you have any other ideas what could be wrong?

Edited by JANKKO
grammar mistake (see edit history)

Share this post


Link to post
Share on other sites
15 hours ago, JANKKO said:

Thanks for answer Matt, I have just done it however it didn't help. Still can't enable the SSL for all pages. I can't even login into the backoffice while on https. it just redirects me to the login page at http. and there the option is greyed out. Do you have any other ideas what could be wrong?

redirects to HTTP is because your site haven't enable SSL, please check the following: 

1. make sure your SSL is work, and click please click here to check if your shop supports HTTPS, if nothing happened, please check your browser url, if browser using https, it's good, otherwise, the SSL still not work, please check your settings.

2.  Check you can connect to DB, and has authentication to make query

3. execute UPDATE command, and remember ps_configuration is default table name, change to your setting

Quote

UPDATE ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED";
UPDATE ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED_EVERYWHERE";

 

if you can provide some screenshots, that's will be more info to help

Share this post


Link to post
Share on other sites

I have next fix in my Ansible playbook:

 

    - name: Enable https
      shell: mysql -e 'UPDATE {{database_name}}.ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED";'

    - name: Enable https everywhere
      shell: mysql -e 'UPDATE {{database_name}}.ps_configuration SET value=1 WHERE name="PS_SSL_ENABLED_EVERYWHERE";'

 

Share this post


Link to post
Share on other sites
On 7/24/2020 at 5:43 AM, Matt.Chang said:

redirects to HTTP is because your site haven't enable SSL, please check the following: 

1. make sure your SSL is work, and click please click here to check if your shop supports HTTPS, if nothing happened, please check your browser url, if browser using https, it's good, otherwise, the SSL still not work, please check your settings.

2.  Check you can connect to DB, and has authentication to make query

3. execute UPDATE command, and remember ps_configuration is default table name, change to your setting

if you can provide some screenshots, that's will be more info to help

Ok, so today when I was about to take some screenshots, I got a step further by clicking the please click here to check if your shop supports HTTPS which actually redirected me to https version with slight limitation though, but before it didn't even redirect me.

So I got some screenshots here:
Capture.PNG.400091e39698dbe0b5ede5b87d115110.PNG
This one shows it's partly protected now after clicking the https test link, instead of staying on http.Capture1.thumb.PNG.5c025883ad2449c9d0e43908db4f57c3.PNG

This one is in czech language but basically it doesn't matter since all I'm trying to show is that the option to allow SSL on all pages is still greyed out without any option to enable it.
Capture2.PNG.69cb2d7ff58ab0c5693494cd42c1af67.PNG
Now here in my database I could actually find the ps_configuration table but I'm not sure what exactly I should look for when you say there should be different table with similar name containing configuration, I search through it all but all I found near the configuration was exactly this one, what doesn't make much sense though is that the PS_SSL_ENABLED  and PS_SSL_ENABLED_EVERYWHERE values are already set to 1 but it makes no change to SSL settings as can be seen on the next screenshot.Capture3.thumb.PNG.1db6b8d0a53496819c9a7e97a57e3a8e.PNG
 

hopefully this helps a bit.
I'm not exactly expert in databases etc. I'm just closest to a programmer my friend with the website had so I'm trying to help, so if you would explain the things to me like I was a 3 years old it definitely helps :D

Thanks for trying to help me.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More