Jump to content

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

Link to comment
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?

Link to comment
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?

Link to comment
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
Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...
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

Link to comment
Share on other sites

  • 1 year later...

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"

Link to comment
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

Link to comment
Share on other sites

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)
Link to comment
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

Link to comment
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";'

 

Link to comment
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.

Link to comment
Share on other sites

  • 4 months later...

Seeing that so many people have encountered this problem, I will reply to everyone and provide a solution. The test is effective:
1. Make sure that SSL is turned on and available for your domain name.

This can be confirmed with your service provider.

2.Clear mysql cache through phpMyAdmin

TRUNCATE `ps_smarty_cache`
TRUNCATE `ps_smarty_lazy_cache`


3. Turn on SSL

CONFIGURE ---> Shop Parameters ---> General ---> Preferences

  • Enable SSL:YES
  • Enable SSL on all pages:YES

WX20201224-142850@2x.thumb.png.e1fc4c7642c3601c8795df1c14db5ebf.png

Don't forget to save the settings, I wish you success, I have successfully turned on SSL.
Merry Christmas everyone~

Edited by ZHSoft (see edit history)
Link to comment
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...