Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


ecook78

Recommended Posts

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', '');

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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');

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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/');

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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/');

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Jack_mcs:Beyond going to Internet options and under browsing history clicking delete, is there a different way to clear the browser cache? I thought about that and figured what I was doing would be sufficient,

Thanks

Link to comment
Share on other sites

Jack_mcs:Beyond going to Internet options and under browsing history clicking delete, is there a different way to clear the browser cache? I thought about that and figured what I was doing would be sufficient,

Thanks

As for clearing cache, that should be all that is needed. It's a good idea, in general, to have another browser installed (IE, FF, Chrome) since they handle ssl errors differently and are good to ensure it is not a cache problem.

 

Regarding the ssl, I didn't think to check the non-ssl pages when I posted previously so i see it isn't working still. I think the most obvious reason at this point is that you've gotten sometihng setup incorrectly. If that is not it, have you ran the test Jim mentioned to verify the ssl is being detected correctly? If you've done that, have you looked in the local directory to be sure there is not a configure file there? If there isn't, it might be that your host is using an old method of setting up secure pages by creating a separate ssl directory. This is no longer used by most hosts but there are some that still use it. If they are using it, you either have to maintain two copies of your files or they have add a "symlink" for the ssl directory.

 

The above, and the things Jim already mentioned, pretty mych exhausts the possibilities. The problem can be probably be quickly solved by someone with more experience on setting it up so I would first ask your host to look at the problem. Explain that the configure file holds the setting so they know where to lool. Some hosts will - some won't. If they won't, you may have to hire someone to look at it for you. Before you do anything else though, you may want to read throuigh How to setup a configure file.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Looks like everything is configured correctly that I can see.

 

The only thing that I can think of is that none of the links that are supposed to use SSL when available are coded that way. After all it is a template and a lot of templates are NOT known for their "terrific coding".

 

Post the contents of your /catalog/login.php file. Let's see how it's coded.

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

If your site does not seem to be recognizing when SSL is available, the problem can be that some servers output '1' for getenv('HTTPS') instead of 'on'. You may need to change code in two or three files to recognize what your server is doing.

Link to comment
Share on other sites

I have just upgraded my shop to 2.3.1. In the installed version, the database server information is not stored in the configure.php files. There's also nothing in the include/local folders. I've searched the forums but can't easily find out how to enable SSL with this change. Should I go in and add the https server address and enable SSL or will this break the installation? If I do edit the configure.php files, how much data about the server should I add?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...