Guest Posted January 19, 2005 Posted January 19, 2005 Hi When i am uploading images i cant see them i my shop. I have changed my includes/configure.php so i dont use the catalog directory. includes/configure.php looks like : <?php /* $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $ 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', 'http://tilenhvertid.dk'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'tilenhvertid.dk'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', ''); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', ''); global $binary_gateway; if ($binary_gateway != '') { define('DIR_WS_IMAGES', $binary_gateway . HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/'); } else { 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', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'xxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxx'); define('DB_DATABASE', 'xxxxxxxxx'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' //featured products define('MAX_DISPLAY_FEATURED_PRODUCTS', '6'); define('MAX_DISPLAY_FEATURED_PRODUCTS_LISTING', '10'); define('FEATURED_PRODUCTS_DISPLAY', 'true'); define('MAX_DISPLAY_WISHLIST_PRODUCTS', '6'); // How many wishlist items to show per page on the main wishlist.php file define('MAX_DISPLAY_WISHLIST_BOX', '4'); // How many wishlist items to display in the infobox before it changes to a counter ?>
Guest Posted January 19, 2005 Posted January 19, 2005 not really any problem here except this: define('HTTP_COOKIE_DOMAIN', 'tilenhvertid.dk'); needs to be this: define('HTTP_COOKIE_DOMAIN', '.tilenhvertid.dk'); (note the extra period) your images directory must have 777 permissions
Guest Posted January 19, 2005 Posted January 19, 2005 it has 777 permissions, but it is still wrong. try and take a look at www.tilenhvertid.dk
Guest Posted January 19, 2005 Posted January 19, 2005 Under admin/categories.php i am able to see an image for the product... but not in my shop ??
Guest Posted January 19, 2005 Posted January 19, 2005 ok try and look at http://tilenhvertid.dk/product_info.php?products_id=1135 only the popup image function works
Guest Posted January 19, 2005 Posted January 19, 2005 not even showing that product as active under hp, do you have it disabled?
Guest Posted January 19, 2005 Posted January 19, 2005 there is no code on that page for an image other than the popup
Guest Posted January 19, 2005 Posted January 19, 2005 What about the admin/includes/configure.php . I specially think about this - define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); I dont have the catalog directory ! <?php /* $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', 'http://tilenhvertid.dk'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://tilenhvertid.dk'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/customers/tilenhvertid.dk/tilenhvertid.dk/httpd.www'); // 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', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_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', 'localhost'); define('DB_SERVER_USERNAME', 'xxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxx'); define('DB_DATABASE', 'xxxxxxxx'); define('USE_PCONNECT', 'xxxxxxxxxxx'); define('STORE_SESSIONS', 'mysql'); ?>
Guest Posted January 19, 2005 Posted January 19, 2005 i cant upload new images. Someone who can tell me why ??
Guest Posted January 19, 2005 Posted January 19, 2005 when i upload an image it comes to the database, but it is not visible at my page ?? But some older images are ..
Simplyeasier Posted January 19, 2005 Posted January 19, 2005 when i upload an image it comes to the database, but it is not visible at my page ??But some older images are .. <{POST_SNAPBACK}> Stab in the dark here When I first loaded osC I noticed none of the FTP'd images were showing on my site even tho I had FTP'd using Smart FTP and binary mode I tried everything including ascii mode :rolleyes: In the end the only thing that worked was to upload the images via cpanel - this for some reason allowed the images that I could see on the images directory to appear on my shop pages HTH Charles A kite flies highest AGAINST the wind ! "Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"
Simplyeasier Posted January 19, 2005 Posted January 19, 2005 what is cpanel ?? <{POST_SNAPBACK}> cpanel is the control panel that comes with some servers \ hosts to allow you to maintain and do admin work on your live site on the server. It allows you amongst other things to do updloads of files including images. Charles A kite flies highest AGAINST the wind ! "Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"
Guest Posted January 19, 2005 Posted January 19, 2005 okay. But i am wondering that i can see some images at my page but not all of them. I can see that all items are uploaded to the tables..
Guest Posted January 19, 2005 Posted January 19, 2005 cpanel is the control panel that comes with some servers \ hosts to allow you to maintain and do admin work on your live site on the server. It allows you amongst other things to do updloads of files including images. Charles <{POST_SNAPBACK}> I don't think that Control Panel will solve your problem if your images are uploading but just not showing up on the catalog page. Your images are being loaded to your server. Your problem is that the code that puts them on the page isn't there. Go to one of your pages that does display the picture and look at the source code. Compare that to a page that does not have an image even though the image shows up on the admin side. Enter the path to the picture that is supposed to be there in your browser and you'll see that the image is on the server.
Guest Posted January 20, 2005 Posted January 20, 2005 Can you see the source kode for this page : http://tilenhvertid.dk/index.php?cPath=181_182
Guest Posted January 20, 2005 Posted January 20, 2005 ok i got this from the source kode : <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=2001"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=2001">hp testing</b></a><br>sdfsdsdfddgdd<br>625,00DKK</td> <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=1138"><img src="images/425234-x80.jpg" border="0" alt="HP Brochure og Flyer Papir A4, 50 ark" title=" HP Brochure og Flyer Papir A4, 50 ark " width="107" height="80"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=1138">HP Brochure og Flyer Papir A4, 50 ark</b></a><br>HP Brochure and Flyer Paper A4, 50 ark (Dobbeltcoated)<br>97,00DKK</td> <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=1136"><img src="images/140404-x80.jpg" border="0" alt="<b>HP</b> hvidt papir, 500 ark" title=" <b>HP</b> hvidt papir, 500 ark " width="107" height="80"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=1136"><b>HP</b> hvidt papir, 500 ark</b></a><br>HP Bright White Papir A4, 500 ark. (90g/m2)<br>63,00DKK</td> </tr> <tr> <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=1134"><img src="images/538859-x80.jpg" border="0" alt="HP 11 - ink tank - Gul" title=" HP 11 - ink tank - Gul " width="107" height="80"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=1134">HP 11 - ink tank - Gul</b></a><br>HP no. 11 color ink cartridge<br>235,00DKK</td> <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=1133"><img src="images/538860-x80.jpg" border="0" alt="HP 11 - ink tank - Magenta" title=" HP 11 - ink tank - Magenta " width="107" height="80"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=1133">HP 11 - ink tank - Magenta</b></a><br>HP no. 11 farve bl?kpatron<br>229,00DKK</td> <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=1130"><img src="images/259374-x80.jpg" border="0" alt="HP 41 - print cartridge" title=" HP 41 - print cartridge " width="107" height="80"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=1130">HP 41 - print cartridge</b></a><br>HP no. 41 tri-color inkjet print cartridge<br>215,00DKK</td> </tr>
Guest Posted January 20, 2005 Posted January 20, 2005 And this is the wrong part : <td align="center" class="smallText" width="33%" valign="top"><a href="http://tilenhvertid.dk/product_info.php?products_id=2001"><b></a><br><a href="http://tilenhvertid.dk/product_info.php?products_id=2001">hp testing</b></a><br>sdfsdsdfddgdd<br>625,00DKK</td>
Guest Posted January 20, 2005 Posted January 20, 2005 It is clear that this is the missing part : <img src="images/425234-x80.jpg" border="0" alt="HP Brochure og Flyer Papir A4, 50 ark" title=" HP Brochure og Flyer Papir A4, 50 ark " width="107" height="80"> What can i do about it ??
Guest Posted January 20, 2005 Posted January 20, 2005 The source kode is from the front page index.php and then from the new_products.php
Guest Posted January 20, 2005 Posted January 20, 2005 The source kode is from the front page index.php and then from the new_products.php <{POST_SNAPBACK}> What we really need to know is what files are involved in generating that code and why isn't the image code in there. What version of osC are you using and what contributions have been installed?
Guest Posted January 20, 2005 Posted January 20, 2005 this code is generated from new_products.php under includes/modules and looks like this : <?php /* $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); new contentBoxHeading($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_info'] = tep_get_products_info($new_products['products_id']);/*Products_Short_Descriptions_V1; added by kir*/ $new_products['products_name'] = tep_get_products_name($new_products['products_id']); //per customer prices Nick start global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $new_products['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $new_products['products_price'] = $customer_group_price['customers_group_price']; } } //per customer prices Nick end $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', /*Products_Short_Descriptions_V1; added by kir 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));*/ 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<b></a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</b></a><br>' . $new_products['products_info'] . '<br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- new_products_eof //-->
Recommended Posts
Archived
This topic is now archived and is closed to further replies.