Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you secure an image in the product page?


jonath469

Recommended Posts

Posted

Hello, I have the ability to put the image exactly where i want to and determine the size and everything;however when my browser hits the page it says "do you want to display secure and non secure items" because for some reason the image isn't in a secure folder somethin...dosen't make sence i put the image in the catalog/image folder.

can someone tell me the path to having a secure image?

Posted
Hello, I have the ability to put the image exactly where i want to and determine the size and everything;however when my browser hits the page it says "do you want to display secure and non secure items" because for some reason the image isn't in a secure folder somethin...dosen't make sence i put the image in the catalog/image folder.

can someone tell me the path to having a secure image?

The way you insert the image has a lot to do with the warning. Hard coding pics will give this warning everytime. Also, I don't know why your product pages are in SSL. This will slow your site down a lot.

 

What is your website, so we can see the problem?

 

Tim

Posted
It's not the image. It is a link, possibly for that image, on the page. You need to find that link and surround it with
<?php if ($request_type == NONSSL) { ?>

and

<?php } ?>

 

Jack

 

 

My webiste?https://host375.ipowerweb.com/~electron/osCommerce/catalog/product_info.php/cPath/3_21/products_id/60?osCsid=aa7eb8ee9ba90ade1c6e3cec72dc2813

 

that is the page im doing it on

 

http:\\www.electronicgizmos.net/oscommerse/catalog/images/saw.jpg

 

is the link

 

what would the full thing look like?

Posted
My webiste?https://host375.ipowerweb.com/~electron/osCommerce/catalog/product_info.php/cPath/3_21/products_id/60?osCsid=aa7eb8ee9ba90ade1c6e3cec72dc2813

 

that is the page im doing it on

 

http:\\www.electronicgizmos.net/oscommerse/catalog/images/saw.jpg

 

is the link

 

what would the full thing look like?

htttp://www.electronicgizmos.net/Saw.jpg

is not a valid image url. you have 3 letter t's in your image source.

Posted
htttp://www.electronicgizmos.net/Saw.jpg

is not a valid image url. you have 3 letter t's in your image source.

 

 

The path is wrong

 

you have

 

http://www.electronicgizmos.net/public_htm.../images/Saw.jpg

 

and it should be

 

http://www.electronicgizmos.net/osCommerce.../images/Saw.jpg

 

but in the code it should be

 

images/Saw.jpg to avoid it being determined as unsecure.

 

if you have an https page and it called ANYTHING that is http it is a secure/non-secure mix.

 

In your configure.php you have public_html somewhere where it shouldn't be

 

here is an example of how mine is set up

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.memorylaneprimitives.com'); // eg, http://localhost - should not be empty for productive s

ervers

define('HTTPS_SERVER', 'https://www.memorylaneprimitives.com'); // eg, https://localhost - should not be empty for productiv

e servers

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

define('HTTP_COOKIE_DOMAIN', 'www.memorylaneprimitives.com');

define('HTTPS_COOKIE_DOMAIN', 'www.memorylaneprimitives.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_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_FS_DOCUMENT_ROOT', '/home/henry/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/henry/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

My Contributions

 

Henry Smith

Posted

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'https://host375.ipowerweb.com');

define('HTTPS_SERVER', 'https://host375.ipowerweb.com');

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

define('HTTP_COOKIE_DOMAIN', 'electronicgizmos.net');

define('HTTPS_COOKIE_DOMAIN', 'host375.ipowerweb.com/~electron');

define('HTTP_COOKIE_PATH', '/~electron/osCommerce/catalog/');

define('HTTPS_COOKIE_PATH', '/~electron/osCommerce/catalog/');

define('DIR_WS_HTTP_CATALOG', '/~electron/osCommerce/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/~electron/osCommerce/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', '/home/electron/public_html/osCommerce/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', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '@@@@@@');

define('DB_SERVER_PASSWORD', @@@@@@@'');

define('DB_DATABASE', 'electron_p_os2');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

Posted
what shoiuld i edit in configure.php?

 

If your store is in the root directory,you can make it almsot identical to mine, though change the obvious, domain names and the path to YOUR home directoy /home/henry/public_html etc..

 

again, pay close attention to / placement's

My Contributions

 

Henry Smith

Posted
what shoiuld i edit in configure.php?

define('HTTP_SERVER', 'https://host375.ipowerweb.com');

 

http server should have an http url not https.

Posted

For some reason theres a warning image on my screen now

warning.gif

 

what dose that mean.

 

for some reason now it's dosn't say the image isn't secure

Posted
I did that

<?php if ($request_type == NONSSL) { ?>

<img src=\"http://www.electronicgizmos.net/osCommerce/catalog/images/Saw.jpg\" width=\"200\" height=\"284\" /><?php } ?>

This should be

<img src=images/images/Saw.jpg width="200" height="284">

If it is in the middle of php, then you will need to start it with ?> and end it with <?php. With the code this way, you can remove the request_type code.

 

Jack

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

Archived

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

×
×
  • Create New...