Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

SSL issues

ssl security certificates

44 replies to this topic

#1 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 22 December 2011, 19:55

I have read the installation guide and made the appropriate changes to the configure.php file and the admin/config file and my site is not switching to ssl. I have the ssl installed from GoDaddy.com for www.ldschurchgifts.com . I have pasted my code below. Any thoughts would be appreciated.

admin/configure.php file
 
define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.ldschurchgifts.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', 'https://www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', 'http://www.ldschurchgifts.com');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
// define our database connection
define('DB_SERVER', 'supremecenter47.com'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'server_username');
define('DB_SERVER_PASSWORD', 'server_password');
define('DB_DATABASE', 'my_database');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>
 
inlcudes/configure.php
 
define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://www.ldschurchgifts.com');
define('HTTPS_CATALOG_SERVER', 'https://ldschurchgifts.com');
define('ENABLE_SSL_CATALOG',true); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
define('DIR_WS_ADMIN', '/catalog/admin/');
define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
define('DIR_WS_CATALOG', '/catalog/');
define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
// define our database connection
define('DB_SERVER', 'supremecenter47.com'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'server_username');
define('DB_SERVER_PASSWORD', 'server_password');
define('DB_DATABASE', 'my_database');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', '');

Edited by Jan Zonjee, 23 December 2011, 12:50.


#2 MrPhil

  • Community Member
  • 3,295 posts
  • Real Name:Phil
  • Gender:Male

Posted 22 December 2011, 23:47

If that is your real database password, change it immediately!

Is your SSL certificate issued to ldschurchgifts.com or www.ldschurchgifts.com? You need to match it exactly in your configuration files for all HTTPS-related items. You appear to be using both forms.

#3 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 23 December 2011, 12:37

Check the contents of the config files on the server to be sure they contain what you THINK they contain.

If you edit them locally and FTP to the server many times permissions on the server don't allow the files to be overwritten.

Also be aware of this:

In the includes FOLDER (catalog and admin) where the normal configure.php files are there is a FOLDER named local

On some installs there may be a configure.php inside the local FOLDER (catalog and admin)

If there is, anything in it overrides anything in the normal configure.php files.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#4 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 27 December 2011, 13:19

I added the www to the lines where I just showed ldschurchgifts.com, as my ssl certificate is for www.ldschurchgifts.com . I am now getting an internet explorer cannot connect and the URL in the address bar is going to http://www.ldschurchgifts.comdir_ws_http_catalogindex.php/?cPath=48&osCsid=28cb51202f9bc5a59dd27893f69cb930 when I click on a product menu. Which looks like a brokern link missing some / after the .com . Also, thank you to Jan Zonjee for removing my password from the post above. Rookie mistake.

Any thoughts on the error above would be appreciated.

#5 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 27 December 2011, 13:21

In response to Germ I looked in the local folders and did not see any configure.php files. Also, should I have the configure.php files set to Read only once editing is complete or something else.

#6 Jack_mcs

  • Community Member
  • 24,454 posts
  • Real Name:Jack
  • Gender:Male

Posted 27 December 2011, 13:33

It doesn't matter if you use www or not with godaddy ssl's. It is just a matter of what you prefer. But once you decide, you need to be consitent with it. Also, the following lines
define('HTTP_COOKIE_DOMAIN', 'ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', 'https://www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', 'http://www.ldschurchgifts.com');
define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
should be (assuming you want to use www)
define('HTTP_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', '/catalog/');
define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) .'/catalog/');
And in the admin's configure file
define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://www.ldschurchgifts.com');
should be
define('HTTP_SERVER', 'https://www.ldschurchgifts.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'https://www.ldschurchgifts.com');

Edited by Jack_mcs, 27 December 2011, 13:34.


#7 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 27 December 2011, 17:16

Jack_mcs,
Do I have my admin/configure.php and the includes/configure.php mixed up because the Cookie Defines are all in my admin not the other. I made your changes. This is what my admin looks like

define('HTTP_SERVER', 'https://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.ldschurchgifts.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) .'/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


This is what the configure.php looks like:

define('HTTP_SERVER', 'https://www.ldschurchgifts.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'https://www.ldschurchgifts.com');
define('HTTPS_CATALOG_SERVER', 'https://www.ldschurchgifts.com');
define('ENABLE_SSL_CATALOG','true'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
define('DIR_WS_ADMIN', '/catalog/admin/');
define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
define('DIR_WS_CATALOG', '/catalog/');
define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');



I am still getting the Internet Explorer error when I click on a product category. It takes me to this link https://www.ldschurchgifts.comdir_ws_http_catalogindex.php/?cPath=37&osCsid=e3b3c5ebcfb9ca6af7191a944571d969 . Which it looks like the ssl is swithced on for just product browsing. Anyways, any ideas on why the product category link is broken? Looks like the ssl issue is working now it flipped to https: . These are the only 2 files I have changed.
Thanks,

#8 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 27 December 2011, 17:37

I had the configure.php and the admin/configure.php mixed up for some reason. I switched them back and my error is now gone. However,under your suggestions above I get the ssl turned on even while browsing products,
Thanks,
-Eric

#9 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 27 December 2011, 17:41

define('HTTP_SERVER', 'https://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
 
Should be:

define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
 
In the config file for the catalog (not the admin).
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#10 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 27 December 2011, 20:44

Germ: I appreciate the feedback. I made the change you suggested to the configure.php file in the catalog folder not the admin folder and now the ssl doesn't work at all for anything. Just curious if you have any ideas on what could be the issue.

Here is my configure.php file

define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.ldschurchgifts.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) .'/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

#11 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 27 December 2011, 21:54

The store must not be recognizing that SSL is "on".

Click the "SSL Implementation Help" link in my signature.

Read the first post in the thread carefully. There are things to check and try.

If none of that helps, then in the second post in the thread there is a link to a contribution I wrote to help in these situations.

Download the contribution, unzip it. then upload the files to your /catalog folder.

Let me know when that is done so I can access them to find out what needs done.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#12 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 29 December 2011, 04:41

I read the information presented on your SSL Implementation Help Link and uploaded the php test files to my website. The website address is ldschurchgifts.com . I tested accessing the files and was able to look at them. Several of the variables tested show UNDEFINED which I am assuming means something has not been defined properly.
Thanks for you help.

#13 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 29 December 2011, 11:15

After running one of the files it looks as if you've accidentally copied the admin config file into the catalog at some point in time and never completely fixed it correctly.

They do have the same name but they are not interchangable.

The catalog config file seems to be missing some of the defines that make SSL work.

Read it off the server and post it again (minus the db data at the bottom).

BE SURE YOU GET THE ONE FROM THE CATALOG, NOT THE ADMIN!!!
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#14 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 29 December 2011, 16:51

I downloaded the zip package again and took the original configure.php file and made the changes to the original and have posted it below. I uploaded it to the site and the SSL is still not working. If I add https: to the first define it turns on but it is on for the entire site not just the checkout pages. Also, I noticed I had installed version 2.2 should I upgrade the site to the current 3.0 version, would that help?

define('HTTP_SERVER', 'http://www.ldschurchgifts.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.ldschurchgifts.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTPS_COOKIE_DOMAIN', '.www.ldschurchgifts.com');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

#15 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 29 December 2011, 17:21

Does it matter where the ssl folder is? I had the hosting company install the ssl for me and they put a folder ssl_certs at the top level folder? Should the ssl certs be in the catalog folder?

#16 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 29 December 2011, 22:25

In your /catalog/includes/application_top.php replace this code:

  $request_type = (getenv('SERVER_PORT') == '443') ? 'SSL' : 'NONSSL';
 
With this code:

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

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#17 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 30 December 2011, 22:32

I made the change you suggested, I don't think anything changed on the ssl side. Should I try the = 1 recommendation in your link. Any other ideas would be appreciated.
Thanks

#18 Jack_mcs

  • Community Member
  • 24,454 posts
  • Real Name:Jack
  • Gender:Male

Posted 31 December 2011, 01:06

The ssl is working fine on your site. Have you tried clearing your browsers cache?

#19 germ

  • Community Member
  • 13,587 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 31 December 2011, 04:50

The SSL is working fine (almost) but the whole site is SSL all the time.

Your define in the /catalog config file for HTTP_SERVER should NOT contain https

It needs to be http

And you're getting "unsecure content" because of this in the code:

  <td height="24" style="background-image:url('http://ecook78.sc47.info/catalog/images/nav-background.gif');">
 

It needs to be:

  <td height="24" style="background-image:url('images/nav-background.gif');">
 

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#20 ecook78

  • Community Member
  • 24 posts
  • Real Name:Eric Cook

Posted 31 December 2011, 06:10

The only way I've been able to get the ssl to work thus far is to add the https to the HTTP_SERVER, which I realize makes the whole site ssl. I just added that to be able to have the ssl working until we figure out what was going on. I switched it back to http: and it is no longer working again. I will work on the image issue. Any other ideas on the ssl?
-Eric