mikerox Posted March 27, 2007 Posted March 27, 2007 I just installed osCommerce and am trying to get it set up (obviously) The program was provided by my hosting provider and it was installed automatically through the control panel, so there was very little configuration on my part. The configuration seems to work fine, but for some reason in the filepath the osCommerce directory repeats itself (does not appear to be a directory within a directory, just repeats itself) when it tries to find images, backup, modules, etc. (see examples below): Backup Directory: /var/www/vhosts/mysite.org/httpdocs/osCommerceosCommerce/admin/backups/ Module Directory: /var/www/vhosts/mysite.org/httpdocs/osCommerceosCommerce/includes/modules/payment/ I looked at the configure.php in the includes directory, but the solution was not obvious to these php novice eyes! Can someone please direct me to where I might find this offending repeated directory name? :'(
GemRock Posted March 27, 2007 Posted March 27, 2007 This is because there's one or two lines wrong in your configure.php files. You better post the first part of your configure.php here, by first part I mean without the database info at the bottom as they are irrelevant. Many people here would be able to tell you whats wrong. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
mikerox Posted March 27, 2007 Author Posted March 27, 2007 Thanks for your quick reply Ken! Below is my configure.php: <?php // Please, note that all changes in this file will be lost // after reconfiguring application by Plesk ini_set("register_globals", "On"); // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://mysite.org/'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for productive servers define('HTTPS_SERVER', 'http://mysite.org/'); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers define('ENABLE_SSL', 0); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'mysite.org'); define('HTTPS_COOKIE_DOMAIN', 'mysite.org'); define('HTTP_COOKIE_PATH', 'osCommerce/'); define('HTTPS_COOKIE_PATH', 'osCommerce/'); define('DIR_WS_HTTP_CATALOG', 'osCommerce/'); define('DIR_WS_HTTPS_CATALOG', 'osCommerce/'); 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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
GemRock Posted March 27, 2007 Posted March 27, 2007 Try this: change: define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])); to: if you are installing under folder osCommerce (note that linux server is case sensitive) define('DIR_FS_CATALOG', 'var/www/vhosts/mysite.org/httpdocs/osCommerce/'); as the real FS path is alreay known, and you can be more sure about it. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
mikerox Posted March 27, 2007 Author Posted March 27, 2007 I thought you were on to something there, but I am still getting the same error. I tried several variations on the same theme (independently of course), just in case... define('DIR_FS_CATALOG', 'var/www/vhosts/mysite.org/httpdocs/osCommerce/'); define('DIR_FS_CATALOG', 'mysite.org/httpdocs/osCommerce/'); define('DIR_FS_CATALOG', 'mysite.org/osCommerce/'); define('DIR_FS_CATALOG', 'http://mysite.org/osCommerce/'); define('DIR_FS_CATALOG', 'http://www.mysite.org/osCommerce/'); Mike
GemRock Posted March 27, 2007 Posted March 27, 2007 Only the first one is likely to be correct - it requires a physical path not a virtual one. If still no luck then try to delete 'oscommerce/' at the end of it, or change define('DIR_WS_HTTP_CATALOG', 'osCommerce/'); to define('DIR_WS_HTTP_CATALOG', '/'); btw, it seems you are not posting the configure.php under admin/includes/ ? That's be the one you'd be looking at. Ken [ quote name=mikerox' date='Mar 27 2007, 09:17 PM' post='1050297] I thought you were on to something there, but I am still getting the same error. I tried several variations on the same theme (independently of course), just in case... define('DIR_FS_CATALOG', 'var/www/vhosts/mysite.org/httpdocs/osCommerce/'); define('DIR_FS_CATALOG', 'mysite.org/httpdocs/osCommerce/'); define('DIR_FS_CATALOG', 'mysite.org/osCommerce/'); define('DIR_FS_CATALOG', 'http://mysite.org/osCommerce/'); define('DIR_FS_CATALOG', 'http://www.mysite.org/osCommerce/'); Mike commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
mikerox Posted March 27, 2007 Author Posted March 27, 2007 This does not make any sense. If I made the changes that I made above, and they are not correct, then I should be getting different error messages, along the lines of having the wrong file paths. But I consistently get the same exact error messages as indicated in my first post. It is as if it is not reloading the configure.php file. I can not "restart" osC (I don't think) but I do keep refreshing the pages each time I upload the modified configure.php file. Am I supposed to be modifying the /includes/configure.php or the admin/includes/configure.php? Now that I think about it, I am probably supposed to working on admin/includees/configure.php but instead, I have been modifying /includes/configure.php. <?php // Please, note that all changes in this file will be lost // after reconfiguring application by Plesk // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', 'http://mysite.org/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://mysite.org/'); define('HTTPS_CATALOG_SERVER', 'http://mysite.org/'); define('ENABLE_SSL_CATALOG', '0'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/mysite.org/httpdocs/osCommerce'); // where your pages are located on the server. define('DIR_WS_ADMIN', 'osCommerce/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', 'osCommerce/'); 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/');
GemRock Posted March 27, 2007 Posted March 27, 2007 That error is only related to the configure.php under admin. Now, these two lines would be the cause of it: [codedefine('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/mysite.org/httpdocs/osCommerce'); // where your pages are located on the server. define('DIR_WS_ADMIN', 'osCommerce/admin/');][/code] Detele the oscommerce in the sencond line. or the oscommerce in: define('DIR_WS_CATALOG', 'osCommerce/'); Sorry I was a bit tired not noticing you were posting the one on the catalog side and not the admin side. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
mikerox Posted March 27, 2007 Author Posted March 27, 2007 :D That was almost perfect! Deleting the osCommerse in second line was a bad idea, I got 404 errors! So I changed define('DIR_WS_CATALOG', 'osCommerce/'); to define('DIR_WS_CATALOG', '/'); and that seems to work great for modules and (images ~ I think, because I don't see errors anymore, so I think that is fixed) But I am still getting the same error for the database backup. so I modified define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); to define('DIR_FS_BACKUP', 'backups/'); and now it works as it should! Hopefully I did not frustrate you too badly for modifying the wrong configure file! I appreciate your patience! Thanks KEN!!
mikerox Posted April 4, 2007 Author Posted April 4, 2007 OK, So after I thought I fixed the problem, I had to step away for a bit, but now that I am coming back to this, I can see that I have not completely solved this issue. Evidently, now I am not able to see the images when I upload them. The images upload fine, and they go to where they are supposed to go, and they are appearing correctly on the catalog side, however, I am not able to see the images on the admin side. I thought I could live with this minor inconvenience, but it is annoying! Also now I can not go directly from admin to the catalog (not a critical issue, just annoying).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.