Jump to content

Archived

This topic is now archived and is closed to further replies.

prosat

problem with no padlock on ssl

Recommended Posts

define('HTTP_SERVER', 'http://www.mysite.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ' https://ssl.perfora.net'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'mysite.com');
 define('HTTPS_COOKIE_DOMAIN', 'ssl.perfora.net/mysite.com');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/mysite.com/catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/kunden/homepages/6/d106792983/htdocs/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'dbxxxx.perfora.net'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'xxxx');
 define('DB_SERVER_PASSWORD', 'xxxx');
 define('DB_DATABASE', 'dbxxxx');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

Share this post


Link to post
Share on other sites

These two lines. You're confusing the heck out of the system.

 

define('HTTPS_SERVER', 'https://ssl.perfora.net');

 

define('DIR_WS_HTTPS_CATALOG', '/mysite.com/catalog/');

 

(and you've got a bogus space here: define('HTTPS_SERVER', '#https, where I put the #. I took it out)

 

Make them standard, like so:

 

define('HTTPS_SERVER', 'https://ssl.perfora.net/mysite.com');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

 

 

By having

 

define('HTTPS_COOKIE_DOMAIN', 'ssl.perfora.net/mysite.com'); [which is correct]

 

and your

 

define('DIR_WS_HTTPS_CATALOG', '/mysite.com/catalog/');

 

you doubled up.


Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Share this post


Link to post
Share on other sites

It should be.

 

That's why I considered finding a solid solution for that line 41 so important.

 

I've seen so many people try this or that combination of paths and so on in the config files trying to solve a problem they couldn't there I decided a real fix was important.

 

So I'll repeat it:

 

// $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

$request_type = (getenv('HTTP_X_FORWARDED_HOST') == 'ssl.perfora.net') ? 'SSL' : 'NONSSL';

 

Once you have that right your configure.php files should look shiny and new, just as stock and standard as can be and they'll work.

 

That solution will also work for many other ssl proxy servers provided you use the little script I posted upthread to find out what values to use instead of ssl.perfora.net.


Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Share this post


Link to post
Share on other sites
It should be.

 

That's why I considered finding a solid solution for that line 41 so important.

 

I've seen so many people try this or that combination of paths and so on in the config files trying to solve a problem they couldn't there I decided a real fix was important.

 

So I'll repeat it:

 

// $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

$request_type = (getenv('HTTP_X_FORWARDED_HOST') == 'ssl.perfora.net') ? 'SSL' : 'NONSSL';

 

Once you have that right your configure.php files should look shiny and new, just as stock and standard as can be and they'll work.

 

That solution will also work for many other ssl proxy servers provided you use the little script I posted upthread to find out what values to use instead of ssl.perfora.net.

 

 

I know this post is 3 years old but my problem is nice n fresh , when i run the little script to see what servers are forwarded they show as blank. when using your later fix for line 41 i get popup for secure & non secure items - whereas when i use the eregi fix i do not, my basic problem is that when i go to ssl mode my checkout gets emptied and when i try to login or create an account in ssl nothing goes through , just bounces back to the form with everything blank again, can you help ?

Share this post


Link to post
Share on other sites

I have a 1and1 account in the UK. I have implemented the fix for $request_type and believe this works. I have all the images being returned with https addresses when I double click the padlock and look at the Media tab. I have header tags installed. I have dedicated SSL from Geotrust. I believe I have my configure.php correct and am happy to post this if you wish. My site is aging-management.com

 

I STILL have padlock that warns "Contains unauthenticated content" when I browse to a SSL enabled page like https://aging-management.com/login.php.

 

I have implemented a file called ssl.php in the root directory to help debug.

 

<?php
 echo '<br>HTTP HOST: ' . "$HTTP_HOST";
 echo '<br>Server Port: ' . getenv('SERVER_PORT');
 echo '<br>SSL Status: ' . getenv('HTTPS');
 echo '<br>Fowarded Server: ' . getenv('HTTP_X_FORWARDED_SERVER');
 echo '<br>Fowarded Host: ' . getenv('HTTP_X_FORWARDED_HOST');
?>
<?php
echo '<br>';
if (getenv('HTTPS') == 'on') {
echo 'You are Secure';
} else {
echo 'You are not secure';
}
?>
<?php
echo '<br>';
if (getenv('HTTPS') == '1') {
echo 'You are Secure';
} else {
echo 'You are not secure';
}
?>
<?php
echo '<br>';
if ($_SERVER['SERVER_PORT'] == '443') {
echo '443 You are Secure';
} else {
echo 'You are not secure';
}
?>
<?php
echo '<br>';
if ($_SERVER['SERVER_PORT'] == '80') {
echo '80 You are Secure';
} else {
echo 'You are not secure';
}
?>

 

You can see the difference between http://aging-management.com/ssl.php and https://aging-management.com/ssl.php.

 

I have compared my double-clicked padlock details and view source to many of the people who have posted here and have resolved this issue and don't understand why I am not getting a padlock. I would be extremely grateful if anyone can shed some light on this.

 

Many thanks in advance.

 

Alistair

Share this post


Link to post
Share on other sites

I worked out what the problem was! It was the google analytics urchin tracker that I had put in the footer. No wonder it wasn't showing up. Have removed it for now and I have SSL. Took me 2 solid days to find it. Pity, as google analytics is a nice piece of software. Now I must learn how to put it back in without compromising security....

Share this post


Link to post
Share on other sites
I worked out what the problem was! It was the google analytics urchin tracker that I had put in the footer. No wonder it wasn't showing up. Have removed it for now and I have SSL. Took me 2 solid days to find it. Pity, as google analytics is a nice piece of software. Now I must learn how to put it back in without compromising security....

 

Great. Thanks this just helped me avoid a long time of looking for a problem. If you come up with a solution to use the google tracker.... It's a great tool and I hate to remove it.

 

Kanobi Comm

Share this post


Link to post
Share on other sites

Im having the same problems as you and tried everything but nothing seems to work...

 

i also try this code

 

$request_type = ($HTTP_SERVER_VARS['SERVER_PORT'] == 443) ? 'SSL' : 'NONSSL';

$request_type = ($HTTP_SERVER_VARS["HTTPS"] == 'on') ? 'SSL' : 'NONSSL';

$request_type = ($GLOBALS["SERVER_PORT"] == 443) ? 'SSL' : 'NONSSL';

 

and checked carefully my config file but nothing happen...

 

And also my admin ssl works pretty well...

can some one help me?

 

Visit My Website

Share this post


Link to post
Share on other sites

I'm on 1 and 1 with a geotrust ssl. My problem is that I edited both configurations correctly, but I am getting a slash padlock in firefox when trying to checkout. I know that this means that there are some links that aren't "https" so the fix would be to "https" the links. Problem, I can't "https" the links in the footer, they don't have a secure server, so the site wouldn't be available. I tried anyway and still get the slashed padlock. The only links that I can find that aren't "https" are all of my category links. If that's the case, how do I convert them to "https" or am I going in the wrong direction?

 

http://thepawlishedpup.com


I'm working on multiple stores with multiple problems.

Share this post


Link to post
Share on other sites

THANKS !! Madhattie and Jondab-Ali

 

Helped me out on shared hosting at nine.ch (Switzerland)

(I am based in Annecy, France)


Regards

David Giorgi

www.chiefdreamer.com

eCommerce development

Share this post


Link to post
Share on other sites

×