If this is your first visit, check our documentation. To post, register or login.
Forums / Basic Configuration / Strange links when using SSL

Strange links when using SSL

Started by jefflc on 12 Oct 2011, 2:59 AM · Views: 852

Results 1 to 7 of 7
12 Oct 2011, 2:59 AM
#1
jefflc avatar

jefflc

New Zenner

Join Date:
Oct 2011
Location:
Ohio
Posts:
28
Plugin Contributions:
0

Strange links when using SSL

Hello all,

With the help of this forum, I've been able to install and significantly customize Zen Cart to my liking with no previous web development experience whatsoever. This time, however, I've hit a wall and haven't found any postings that seem to address my particular problem.

I'm running Zen Cart v1.3.9h. My test store is at https://www.spilstop.com/store

I'm getting ready to switch over to Zen Cart in place of GoDaddy's Quick Shopping Cart. Everything (links, test transactions, etc.) works as long as I use an http address. I purchased a dedicated GoDaddy SSL certificate which appears to be installed properly. The site loads correctly when I use https://www.spilstop.com, but when I go to the store at https://www.spilstop.com/store, most of the page is blank (just basic text).

I made the changes below to includes/configure.php

define('HTTP_SERVER', 'http://www.spilstop.com');
define('HTTPS_SERVER', 'https://www.spilstop.com');
define('ENABLE_SSL', 'true');

and xxxxadmin/includes/configure.php

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

define('ENABLE_SSL_CATALOG', 'true');
define('ENABLE_SSL_ADMIN', 'true');

define('DIR_WS_ADMIN', '/store/xxxxadmin/');
define('DIR_WS_CATALOG', '/store/');
define('DIR_WS_HTTPS_ADMIN', 'https://www.spilstop.com/store/xxxxadmin/');
define('DIR_WS_HTTPS_CATALOG', 'https://www.spilstop.com/store/');

Using Firebug, I found the links to the stylesheets have become corrupted on the https page only:

https://www.spilstop.comhttps//www.spilstop.com/store/includes/templates/xxxx/css/stylesheet.css

https://www.spilstop.comhttps//www.spilstop.com/store/includes/templates/xxxx/css/stylesheet_css_buttons.css

https://www.spilstop.comhttps//www.spilstop.com/store/includes/templates/xxxx/css/print_stylesheet.css

Similarly, when I enter my user name and password and click "Login" on the Zen Cart admin login page, it tries to load:

https://www.spilstop.comhttps//www.spilstop.com/store/xxxxadmin/login.php

It seems fairly obvious that it's the repeating "https://www..." that causing the problem. I also noticed the colon between the second https and the "//" is missing, so I suspect there are two fields being combined into one web address. I just can't find where.

Any suggestions would be greatly appreciated.

12 Oct 2011, 3:37 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Strange links when using SSL

JeffLC:

and xxxxadmin/includes/configure.php

define('DIR_WS_HTTPS_ADMIN', 'https://www.spilstop.com/store/xxxxadmin/');
define('DIR_WS_HTTPS_CATALOG', 'https://www.spilstop.com/store/');

These two are wrong.

They need to be file paths, not URL's.

EG:

define('DIR_WS_HTTPS_ADMIN', '/store/xxxxadmin/');
define('DIR_WS_HTTPS_CATALOG', '/store/');

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Oct 2011, 3:54 AM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Strange links when using SSL

There is also these two lines that have to be changed.

define('DIR_FS_ADMIN', '/store/xxxxadmin/');
define('DIR_FS_CATALOG', '/store/');

Also, you must also change your 'includes/configure.php' file to reflect the correct paths.

The learning is in the doing.

Potent Products

12 Oct 2011, 4:26 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Strange links when using SSL

Website Rob:

There is also these two lines that have to be changed.

define('DIR_FS_ADMIN', '/store/xxxxadmin/');
define('DIR_FS_CATALOG', '/store/');

Also, you must also change your 'includes/configure.php' file to reflect the correct paths.

And once again Website Rob shows his ignorance.

WHY would JeffLC need to change these?

There is nothing to suggest that they are wrong, and these settings will affect both SSL and Non-SSL. Clearly, not the case here.

Your suggestion will help solve the problem just as much (or as little) as telling the OP to check ALL of thier configuration settings, regardless of the problem. This is the kind of useless advice that I've come to expect of you.

Jeff, by all means take Robs advice, but I can tell you now, that this part of your configuration is already correct. The symptom you report is proof of that.

If you just want to fix the problem, with no further ado, and without chasing shadows, the two corrections that I provided will take care of your problem.

Website Rob has simply made it his lifes' ambition to critique almost anything I write, and his knowledge of computers is well below standard, to the extent that he still thinks that to get things to work is a matter of luck and mystical incantations (or the configuration equivalent).

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Oct 2011, 12:14 PM
#5
jefflc avatar

jefflc

New Zenner

Join Date:
Oct 2011
Location:
Ohio
Posts:
28
Plugin Contributions:
0

Re: Strange links when using SSL

I made the changes to the DIR_WS statements and that fixed the problem. Although I didn't post it (because I forgot I modified it), I made the same error in the other configure.php file. I guess I got a little happy making my original changes. While I was in the files, I noticed the comment lines that clearly state the DIR_WS statements are relative paths to the top of the workspace. Oh well... when all else fails, read the directions.

I didn't need to change the DIR_FS statements.

Thanks for the help. My blood pressure is now down to a more reasonable level. :clap:

Jeff

12 Oct 2011, 12:24 PM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Strange links when using SSL

JeffLC:

I didn't need to change the DIR_FS statements.

Told ya so :smartalec:

JeffLC:

Thanks for the help. My blood pressure is now down to a more reasonable level. :clap:

I wish mine was. :thumbsup:

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Oct 2011, 6:22 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Strange links when using SSL

It was a assumption on my part the if the other path entries were incorrect then the 'DIR_FS' paths would be also. No big deal if they were already correct. And if the paths in the Admin config file were incorrect it was also a logical assumption the paths in the main config file would need correcting as well.

As to Rod's egregious post, he flatters me with all the attention he provides. My post was not directed at Rod nor was he addressed in my post. Rod sounds like an egotistical egotist echoing egotistical ecstasies. It's all about 'him' no matter what I post, even though what I posted "did" help the OP.

JeffLC:

Although I didn't post it (because I forgot I modified it), I made the same error in the other configure.php file. I guess I got a little happy making my original changes.

The learning is in the doing.

Potent Products