Forums / General Questions / SSL Stopped Working Suddenly

SSL Stopped Working Suddenly

Locked
Results 1 to 9 of 9
This thread is locked. New replies are disabled.
19 Aug 2006, 23:25
#1
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

SSL Stopped Working Suddenly

Both my admin and my catalog https:// stopped working. I have my admin https:// back up but nothing I do brings it back on the catalog side.

I had installed Image Handler 2 and had to remove it due to errors. I have replaced my files with backups even after deleting the store folder. No luck.

Here is the pertinent part of my includes/configure.php (The image url is how I want it to display both images on my server and hotlinking images):

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_CATALOG', '/zencart/');

define('DIR_WS_IMAGES', '');
define('DIR_WS_INCLUDES', 'includes/');
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', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/amerint/public_html/zencart/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
define('DB_SERVER_USERNAME', 'private');
define('DB_SERVER_PASSWORD', 'private');
define('DB_DATABASE', 'amerint_zc1');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'file');
define('DIR_FS_SQL_CACHE', '/home/amerint/public_html/zencart/cache');

?> /end of file

Here is my admin/includes/configure.php:
*/
define('HTTP_SERVER', 'http://www.amerintconcepts.com');
define('HTTPS_SERVER', 'https://www.amerintconcepts.com');
define('HTTP_CATALOG_SERVER', 'http://www.amerintconcepts.com');
define('HTTPS_CATALOG_SERVER', 'https://www.amerintconcepts.com');

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

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/zencart/admin/');
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_ADMIN', '/zencart/admin/');
define('DIR_WS_HTTPS_CATALOG', '/zencart/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
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', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/home/amerint/public_html/zencart/admin/');
define('DIR_FS_CATALOG', '/home/amerint/public_html/zencart/');

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_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
define('DB_SERVER_USERNAME', 'private');
define('DB_SERVER_PASSWORD', 'private');
define('DB_DATABASE', 'amerint_zc1');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'file');
define('DIR_FS_SQL_CACHE', '/home/amerint/public_html/zencart/cache');

?> /end of file

Any suggestions?
20 Aug 2006, 04:29
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: SSL Stopped Working Suddenly

the includes/configure.php content you posted is missing the HTTP_SERVER and HTTPS_SERVER lines. I assume that was either intentional or just a copy/paste error.

The settings for your admin side use DIR_WS_IMAGES as 'images/' but your store-side configure.php has it set to ''

I don't understand this statement:
(The image url is how I want it to display both images on my server and hotlinking images)

And this one suggests you've had some problems, but you don't mention "what" the problems were:
I had installed Image Handler 2 and had to remove it due to errors.
20 Aug 2006, 23:02
#3
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

Re: SSL Stopped Working Suddenly

DrByte:

the includes/configure.php content you posted is missing the HTTP_SERVER and HTTPS_SERVER lines. I assume that was either intentional or just a copy/paste error.

The settings for your admin side use DIR_WS_IMAGES as 'images/' but your store-side configure.php has it set to ''

I don't understand this statement:
(The image url is how I want it to display both images on my server and hotlinking images)

And this one suggests you've had some problems, but you don't mention "what" the problems were:
I had installed Image Handler 2 and had to remove it due to errors.



Yes, I didn't include the top part of the includes/configure.php because I was hoping not to have to clutter up the place with all the lines.

On the DIR_WS_IMAGES, we have found that if we put it as ' ' taking the word images/ out, just in that spot, then the product pictures we store on our site as well as the pictures that are accessed via urls show. Some of the other images and image folders we have to move to the main catalog dir for this to work.

I don't remember the specific error msg I got with Image Handler but it had something to do with "bmz_image_handler.class.php on line 205".

I have isolated the SSL/https: problem to either the Ultimate SEO Urls and/or the Image Handler 2.

Tomorrow, I shall try re installing the Ultimate SEO Urls and then the Image Handler 2 and can let you know the specific errors at that time, IF they re-occur.

I have now gone back to a backup far enough back that my store SSL/https: is working, in preparation for the re-installs.

This forum and Zen Cart are great!

Thanks!
21 Aug 2006, 02:57
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: SSL Stopped Working Suddenly

It would be prudent to test in a separate install so as to not take your live site down due to an error...
23 Aug 2006, 02:21
#5
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

Re: SSL Stopped Working Suddenly

DrByte:

It would be prudent to test in a separate install so as to not take your live site down due to an error...

Ok, it's something in the Ultimate SEO Urls module.

This is my original includes/functions/html_output.php(well the part that is pertinent to this discussion, I think):
* The HTML href link wrapper function
*/
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;

if (!zen_not_null($page)) {
die('</td></tr></table></td></tr></table><br /><br /><strong class="note">Error!<br /><br />Unable to determine the page link!</strong><br /><br />');
}

if ($connection == 'NONSSL') {
$link = HTTP_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == 'true') {
$link = HTTPS_SERVER ;
} else {
$link = HTTP_SERVER;
}
} else {
die('</td></tr></table></td></tr></table><br /><br /><strong class="note">Error!<br /><br />Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
}

if ($use_dir_ws_catalog) {
if ($connection == 'SSL' && ENABLE_SSL == 'true') {
$link .= DIR_WS_HTTPS_CATALOG;
} else {
$link .= DIR_WS_CATALOG;
}
}

if (!$static) {
if (zen_not_null($parameters)) {
$link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
} else {
$link .= 'index.php?main_page=' . $page;
}
} else {
if (zen_not_null($parameters)) {
$link .= $page . "?" . zen_output_string($parameters);
} else {
$link .= $page;
}
}

$separator = '&';

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
if (defined('SID') && zen_not_null(SID)) {
$sid = SID;
// } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
if ($http_domain != $https_domain) {
$sid = zen_session_name() . '=' . zen_session_id();
}
}
}

// clean up the link before processing
while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

$link = str_replace('&', '/', $link);
$link = str_replace('?', '/', $link);
$link = str_replace('&', '/', $link);
$link = str_replace('=', '/', $link);

$separator = '?';
}

if (isset($sid)) {
$link .= $separator . $sid;
}

// clean up the link after processing
while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

$link = ereg_replace('&', '&', $link);
return $link;
}


Here is the part that the module instructions say to replace the above with:

// Ultimate SEO URLs v2.100
// The HTML href link wrapper function
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
if (!isset($GLOBALS['seo_urls']) && !is_object($GLOBALS['seo_urls'])) {
include_once(DIR_WS_CLASSES . 'seo.url.php');

$GLOBALS['seo_urls'] = &new SEO_URL($_SESSION['languages_id']);
}

return $GLOBALS['seo_urls']->href_link($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
}

Now the thing is, I used a backup to replace the html_output.php file after it made it where the ssl won't work and the ssl still won't work. There might be something else in some of the other files that are messing with the ssl.

Anyway suggestions? I'd really like to use this module but as it is right now, it's not safe to use on a live shop with these ssl problems.

Thanks!
23 Aug 2006, 02:33
#6
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

Re: SSL Stopped Working Suddenly

Ok, I went back and took the html_output.php from the ultimate seo url's module folder and placed it in the proper folder on the server and now ssl works.

The instructions for making the file changes manually are wrong at this url or else I'm not reading it right:

http://www.dream-scape.com/pub/zencart/Ultimate_SEO_URLs/install.html

The rest of the files on that installation page I left at having done the changes manually and it's seeming to work right. Let's hope. I didn't want to use the prefigured files at first because I wasn't sure if some of those files had been changed or not due to other module installations.

Thanks
23 Aug 2006, 03:10
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: SSL Stopped Working Suddenly

davik1000:

The instructions for making the file changes manually are wrong at this url or else I'm not reading it right:

http://www.dream-scape.com/pub/zencart/Ultimate_SEO_URLs/install.html

Correct... they are wrong if you are installing for v1.3.x
The readme in the updated contribution contains the details of the differences.
25 Aug 2006, 05:12
#8
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: SSL Stopped Working Suddenly

I am having the same issue, where do you but the html_output.php file?
25 Aug 2006, 15:34
#9
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

Re: SSL Stopped Working Suddenly

catalog/includes/functions/