Zen Cart Logo
Forums / General Questions / This page contains both secure and nonsecure items

This page contains both secure and nonsecure items

Locked

Views: 5,732

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
20 Mar 2007, 6:06 PM
#1
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

This page contains both secure and nonsecure items

I am getting this error on the SSL page
This page contains both secure and nonsecure items
I went into the Firefox, clicked on the lock, went to the Media tab and see there that there are url with http, most of them are images pointing to the template
How can I change or where do I make the change so that the error stops occuring?
Thanks

20 Mar 2007, 6:24 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

When prompted to display or NOT display insecure elements, choose NOT display. Then you will see what's causing the alert cause there will be a gap or place-holder there.

This occurs when you have absolute URL's (eg: http://www.thatsite.com/images/pic1.gif) calling resources from outside the https server.

There are PLENTY of posts about this problem on the forum - and all the solutions. (I provided one just a few days ago.)

20 Mar 2007, 6:33 PM
#3
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

As I said in the post I have all the images which are http
Now where do I make changes in the zen cart...which files?

20 Mar 2007, 6:45 PM
#4
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Hi
Ajeh
I saw in the View Source of the Web page that all the images are getting referenced in this way
src="images/cc_logos/logo_ccVisa.gif
i.e., relate url and not the hard coded
Can you please help me as to what to do

20 Mar 2007, 8:05 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: This page contains both secure and nonsecure items

What is the URL where this is happening ?

20 Mar 2007, 9:19 PM
#6
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Try this

Click here

Try the login page and checkout page!

21 Mar 2007, 4:37 PM
#7
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items


Anyone??

21 Mar 2007, 4:49 PM
#8
j_schilz avatar

j_schilz

New Zenner

Join Date:
Mar 2007
Posts:
40
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

superprg,

I took a look at your source, and it appears that this is responsible for your problem:

<base href="http://www.poker-dude.com/" />

I don't know the fix myself, but the following might help:

http://www.zen-cart.com/forum/showthread.php?t=54680

21 Mar 2007, 5:05 PM
#9
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Well in my template I have

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
21 Mar 2007, 5:09 PM
#10
j_schilz avatar

j_schilz

New Zenner

Join Date:
Mar 2007
Posts:
40
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

I'm sorry that I don't know more to tell you why it's happening. For whatever reason, however, your cart is serving that line of source in your secure pages, and your visitors browsers in turn are grabbing all of your relative url content via http.

--Joe

21 Mar 2007, 5:19 PM
#11
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Well, what do I do now?

As instructed by Ajeh

I put this script in the server

<?php
$request_type = ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == '1') || (isset($_SERVER['HTTP_X_FORWARDED_BY']) && strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']),'SSL')) || (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']),'SSL')) || (isset($_SERVER['SCRIPT_URI']) && strtolower(substr($_SERVER['SCRIPT_URI'], 0, 6)) == 'https:') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ) ) ? 'SSL' : 'NONSSL';
echo 'I SEE ' . $request_type;
?> 

and all I get is I SEE NONSSL

21 Mar 2007, 5:24 PM
#12
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,603
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Who is your host?

21 Mar 2007, 5:30 PM
#13
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

NetworkSolutions

21 Mar 2007, 5:48 PM
#14
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Images on the site are not being referenced as https
Is that the problem??
Someone please help!

21 Mar 2007, 5:58 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: This page contains both secure and nonsecure items

That is precisely the problem ...

It cannot be determined when your site is secure or not secure to change the setting for your site properly ...

For giggles and grins what happens if you switch to Classic template?

21 Mar 2007, 6:02 PM
#16
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Response from Host:
Problem is with the images not being https. Go to the secure login page and click on any image. You will see that on the secure pages, the images are not secure -- https

What do I do?

21 Mar 2007, 6:04 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: This page contains both secure and nonsecure items

Show them that code ...

Ask them why we cannot tell, with all of that code, whether or not the site is secure ... :lamo:

21 Mar 2007, 6:07 PM
#18
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Ajeh:

For giggles and grins what happens if you switch to Classic template?

After changing it to Classic
same message appears when clicking login

Is there any workaround?

21 Mar 2007, 6:09 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: This page contains both secure and nonsecure items

Ask Network Solution why this code cannot detect if their secure pages are secure:

<?php
$request_type = ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == '1') || (isset($_SERVER['HTTP_X_FORWARDED_BY']) && strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']),'SSL')) || (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']),'SSL')) || (isset($_SERVER['SCRIPT_URI']) && strtolower(substr($_SERVER['SCRIPT_URI'], 0, 6)) == 'https:') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ) ) ? 'SSL' : 'NONSSL';
echo 'I SEE ' . $request_type;
?>
21 Mar 2007, 6:14 PM
#20
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: This page contains both secure and nonsecure items

Ajeh, can you tell me why do I get images as http when I click on the lock in FireFox and click on media tab..Is that not the problem?