Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image doesn't exist - HELP!


jianming80

Recommended Posts

I have solve the problem of image doesn't exist by placing

 

placing new line

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

line after the:

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

 

then my admin page doens't show the error msg on top. Anyway, i still unable for me to see those image under administration page?

 

Please advice where I should edit again,here is my admin/configure page

 

<?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://smartech2u.com/onlinestore'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://smartech2u.com/onlinestore'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTPS_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTP_COOKIE_PATH', '/onlinestore/');

define('HTTPS_COOKIE_PATH', '/onlinestore/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_ADMIN', '/admin/');

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_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

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

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

 

// protected since inside docroot instead of outside to facilitate addon installer

define('DIR_FS_WORK', '/home/smartech/public_html/onlinestore/admin/_work/');

 

THANK YOU IN ADVANCE.

JianMing

Link to comment
Share on other sites

It would be better to use:

define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT']) . '/');

 

View the source code of a generated page and what is the path for the images?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

It would be better to use:

define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT']) . '/');

 

View the source code of a generated page and what is the path for the images?

 

Hi Daemonj

First of all, thanks for your help.

When I replace define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); with define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT']) . '/');

 

Immediately, i can't login to my page with error Parse error: parse error, unexpected ')' in /home/smartech/public_html/onlinestore/admin/includes/configure.php on line 36.

 

I think my previous help on oscommerce is correct and the images doesn't exist is not showed on the top of my administration page of oscommerce.

 

Just wonder when i go to category - catalog, i try to upload some image and found all of my image is incorrect. Actually what images should I edit? There is two configure.php file, one is under my /admin/includes/configure.php and another is at onlinestore/includes/configure.php

 

I am a bit of confuse on this two files as I do not have basic of php.

Please assist.

Thank you so much.

Link to comment
Share on other sites

I apologize, as the parse error was my fault. I guess I shouldn't post when I am tired. ;)

 

The proper define statement is:

define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT'] . '/');

 

Try that and then view the source code of a generated page for the page of an image that is not displaying and let me know what it is.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I apologize, as the parse error was my fault. I guess I shouldn't post when I am tired. ;)

 

The proper define statement is:

define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT'] . '/');

 

Try that and then view the source code of a generated page for the page of an image that is not displaying and let me know what it is.

 

Hi Daemonj, Thanks, very appreciated your spirit. It's not a problem when you post something when you're tired :)

 

I update your code and found that immediately it show that ' /public_htm/images' is not writable.

I change my images folder to 777 and it doesn't show any error. i know mine problem because i install my oscommerce under "www.smartech2u.com/onlinestore" as I do not know how to install under root folder using cpanel. I might need to move all mine folders using ftp application to root, in that case. what if I want to remain my current setting..smartech.com/onlinestore , i need to edit which part of my mine images folders? I found I have one under /public_html/onlinestore/images/ and another under /public_html/onlinestore/admin/images/. Please advice how do i edit configure.php to effect front and back store of images. :)

 

Thank you in advance

Link to comment
Share on other sites

In your includes/configure.php file, you should have a line like:

define(DIR_WS_IMAGES, 'images');

 

Set it to the following:

define(DIR_WS_IMAGES, 'onlinestore/images');

 

The line in your admin should be:

define(DIR_WS_IMAGES, 'onlinestore/admin/images');

 

And that should get you going.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Daemonj,

 

Thanks for your reply. I try to replace both answer vice versa, can't work though. I change back my previous configure.php as I only have problem when I go to admin page/when want to add catalog.

 

Here you go for admin/configure.php

<?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://smartech2u.com/onlinestore'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://smartech2u.com/onlinestore'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTPS_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTP_COOKIE_PATH', '/onlinestore/');

define('HTTPS_COOKIE_PATH', '/onlinestore/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_ADMIN', '/admin/');

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', $_SERVER['DOCUMENT_ROOT'] . '/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

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

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

 

Below are the onlinestore/includes/configure.php

<?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://smartech2u.com/onlinestore'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://smartech2u.com/onlinestore'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTPS_COOKIE_DOMAIN', 'smartech2u.com');

define('HTTP_COOKIE_PATH', '/onlinestore/');

define('HTTPS_COOKIE_PATH', '/onlinestore/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_ADMIN', '/admin/');

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

 

// protected since inside docroot instead of outside to facilitate addon installer

define('DIR_FS_WORK', '/home/smartech/public_html/onlinestore/admin/_work/');

 

Kindly have a look.

Thanks.

 

Stanley

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...