Zen Cart Logo
Forums / General Questions / Https not working on admin

Https not working on admin

Locked

Views: 1,732

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
31 Jan 2009, 3:26 PM
#1
mel150 avatar

mel150

New Zenner

Join Date:
Aug 2008
Posts:
78
Plugin Contributions:
0

Https not working on admin

Hi- Security is working on my catalog, if I check out the url turns into https. But on the admin, if I go into it using https, and click on any link, the url changes back to plain old http. Here is the code I'm using(It's my own certificate, not shared, and I'm using my actual domain name):

define('HTTP_SERVER', 'http://mysite.com');
define('HTTPS_SERVER', 'https://mysite.com');
define('HTTP_CATALOG_SERVER', 'http://mysite.com');
define('HTTPS_CATALOG_SERVER', 'https://mysite.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'true');

Can anyone help? Thanks!:blink:

31 Jan 2009, 4:31 PM
#2
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Re: Https not working on admin

There should be another line under the top four that says: define('ENABLE_SSL', 'true'); Add this and see what happens.

define('HTTP_SERVER', 'http://mysite.com');
define('HTTPS_SERVER', 'https://mysite.com');
define('HTTP_CATALOG_SERVER', 'http://mysite.com');
define('HTTPS_CATALOG_SERVER', 'https://mysite.com');
define('ENABLE_SSL', 'true');

This is also the admin/includes/configure.php right?

31 Jan 2009, 10:48 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Https not working on admin

Changes to the overall admin infrastructure will happen during the admin rewrite phase, scheduled for a future release.
Meanwhile, follow the instructions in the configure.php file for making all admin pages handled by SSL.
If for some reason your file doesn't contain that info, there are many forum threads discussing the topic. Here's one recent one: http://www.zen-cart.com/forum/showthread.php?t=113610

12 Feb 2009, 3:49 PM
#4
mel150 avatar

mel150

New Zenner

Join Date:
Aug 2008
Posts:
78
Plugin Contributions:
0

Re: Https not working on admin

Hi- Thanks for the advice, MagicMan. I added the line define('ENABLE_SSL', 'true');, (And you're right, it was admin/includes/configure.php), but I have the same problem.

Dr.Byte, thanks for that thread, and I've followed the instructions there, but with the same result.

Now I have:

define('HTTP_SERVER', 'https://mysite.com');
define('HTTPS_SERVER', 'https://mysite.com');
define('HTTP_CATALOG_SERVER', 'https://mysite.com');
define('HTTPS_CATALOG_SERVER', 'https://mysite.com');
define('ENABLE_SSL', 'true');
// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'true');

But if I click around within admin, I still go back to http. :no:

12 Feb 2009, 3:52 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Https not working on admin

And ... when you made those edits and uploaded the changes to the server, did the upload actually happen properly?
If the file on the server is marked as read-only (which it should be for security reasons), then you need to mark it as writable before you can upload changes to it. Then mark it read-only again.
Otherwise your changes won't take effect.

12 Feb 2009, 4:48 PM
#6
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Re: Https not working on admin

This may sound like a stupid question, but do you have an valid SSL Certificate?

Scratch the above...You said that you had your own dedicated SSL in you initial post. Sorry.

12 Feb 2009, 10:07 PM
#7
mel150 avatar

mel150

New Zenner

Join Date:
Aug 2008
Posts:
78
Plugin Contributions:
0

Re: Https not working on admin

That's a great question- I downloaded the configure.php file to my desktop from the cart, opened it, and the changes are not there. So you're exactly right, DrByte! I'm not sure how to change that to writeable, but I'll find out and make it so. Thanks!!:D

12 Feb 2009, 10:19 PM
#8
mel150 avatar

mel150

New Zenner

Join Date:
Aug 2008
Posts:
78
Plugin Contributions:
0

Re: Https not working on admin

And- that worked!! Thanks you both for your help and patience!:clap:

15 Feb 2009, 12:08 PM
#9
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Re: Https not working on admin

Glad it worked.

Dr. Byte, what should the CHMOD settings be for this file? Thanks.

15 Feb 2009, 2:42 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Https not working on admin

MagicMan:

Glad it worked.

Dr. Byte, what should the CHMOD settings be for this file? Thanks.
Assuming you're referring to the configure.php file, the permissions setting should be whatever makes the file read-only on your server. Each server is configured differently, so you may have to check with your hosting company for the correct setting. Typical settings for "read only" would be 644 or 444.

Related FAQs:
https://www.zen-cart.com/tutorials/index.php?article=90
https://www.zen-cart.com/tutorials/index.php?article=9
https://www.zen-cart.com/tutorials/index.php?article=148
https://www.zen-cart.com/tutorials/index.php?article=7

15 Feb 2009, 8:19 PM
#11
magicman avatar

magicman

Zen Follower

Join Date:
Oct 2007
Location:
MA, USA
Posts:
385
Plugin Contributions:
0

Re: Https not working on admin

Yes. I had mine set to 644 which is read only accept for the user is also write. Just to be safe I made them all 444.

For all concerned. I could not change the CHMOD settings via my FTP program. I had to log into my server with Cpanel and make the change server side.

Thanks for the fast reply. Have a great day.