Guest Posted May 7, 2009 Posted May 7, 2009 when I open my htdocs/index.html file I get a blank browser page with the following message: "This is a technical file included in your template package for security reasons. Please refer to technical documentation for the correct path to your template index file" I have tried to find this documentation referred to with no luck. so... where is the actual index.html located? additionally if I type www.mypage.com into the browser I get the same page. the only way to actually view my page in a browser is at www.mypage.com/osc/ I see no index.html file in the osc directory. What am i missing?????
bkellum Posted May 8, 2009 Posted May 8, 2009 osCommerce is a PHP script so you will not see a HTML file but rather index.php. Obviously you installed osComemerce into a folder named "osc" so the path to osCommerce index.php would be: http://www.your_domain.com/osc/ Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Guest Posted May 8, 2009 Posted May 8, 2009 osCommerce is a PHP script so you will not see a HTML file but rather index.php. Obviously you installed osComemerce into a folder named "osc" so the path to osCommerce index.php would be: http://www.your_domain.com/osc/ ok, that is what I currently have. my next question is how do I remove or hide the /osc/ from the url so that my site can be reached at www.domainname.com rather than www.domainname.com/osc/ or can I relocate or copy index.php to the htdocs directory on my server? thanx
BryceJr Posted May 8, 2009 Posted May 8, 2009 ok, that is what I currently have. my next question is how do I remove or hide the /osc/ from the url so that my site can be reached at www.domainname.com rather than www.domainname.com/osc/ or can I relocate or copy index.php to the htdocs directory on my server? thanx Copy/move the contents of your osc folder to htdocs and make changes to your configure.php files.
Guest Posted May 8, 2009 Posted May 8, 2009 Copy/move the contents of your osc folder to htdocs and make changes to your configure.php files. I'll give it a shot
Guest Posted May 8, 2009 Posted May 8, 2009 Copy/move the contents of your osc folder to htdocs and make changes to your configure.php files. ok so I did that all successfully thank you, my url is now www.domainname.com instead of www.domainname.com/osc/ but now I have a new problem. when the page opens I get the page layout with some content and this error message at the top :Warning: I am able to write to the configuration file: /home/web02/b/bestglobalhost.com/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. as well my .css style is not showing. any ideas as to why. all I did was copied the contents of the osc/ directory out into htdocs/ then I edited includes/configure.php AND admin/includes/configure.php to remove any any entry of osc/ as the directory was deleted being sure to replace it with htdocs/ where needed. ie some entries were htdocs/osc/ here I just deleted osc/ other entries were /osc/ -- osc was replaced with htdocs. I made sure to retain ALL special characters such as ' or / or ), or ; I swear I saw a thread with the same error message at the top of page but I can not for the life of me find it after 45 min of searching. please help... I need to solve the above error message and return my .css
BryceJr Posted May 8, 2009 Posted May 8, 2009 Post your configure.php files. Do NOT post the database section.
Guest Posted May 8, 2009 Posted May 8, 2009 Post your configure.php files. Do NOT post the database section. www.bestglobalhost.com here you can see the error message at the top of page as well that the .css style is not showing. the below code and files is the only things I changed. sorry tried to make the change notes (//) green to be easier to see and separate from code but I guess because of already being in code tags it would not take the color. includes/configure.php <?php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTPS_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'bestglobalhost.com'); define('HTTPS_COOKIE_DOMAIN', 'bestglobalhost.com'); define('HTTP_COOKIE_PATH', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('HTTPS_COOKIE_PATH', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('DIR_WS_HTTP_CATALOG', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('DIR_WS_HTTPS_CATALOG', '/htdocs/'); // was '/osc/' changed to '/htdocs/' 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/web02/b/bestglobalhost.com/user/htdocs/'); //deleted osc/ from end of string, define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xx.xx.xx.xx'); // deleted Db info for posting - unchanged in live file define('DB_SERVER_USERNAME', 'username'); // deleted Db info for posting - unchanged in live file define('DB_SERVER_PASSWORD', 'pass'); // deleted Db info for posting - unchanged in live file define('DB_DATABASE', 'dbname'); // deleted Db info for posting - unchanged in live file define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> admin/includes/configure.php <?php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTP_CATALOG_SERVER', 'http://bestglobalhost.com'); define('HTTPS_CATALOG_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/web02/b/bestglobalhost.com/user/htdocs/'); // deleted osc/ from end of string define('DIR_WS_ADMIN', '/admin/'); // was '/osc/admin/' - deleted /osc, do I need to replace /osc with /htdocs? define('DIR_FS_ADMIN', '/home/web02/b/bestglobalhost.com/user/htdocs/admin/'); //was htdocs/osc/admin - deleted osc/ define('DIR_WS_CATALOG', '/htdocs/'); // was '/osc/' - changed to '/htdocs/' define('DIR_FS_CATALOG', '/home/web02/b/bestglobalhost.com/user/htdocs/'); // removed osc/ from end of string 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('DB_SERVER', 'xx.xx.xx.xx'); //changed DB info for posting - unchanged in live file define('DB_SERVER_USERNAME', 'username'); //changed DB info for posting - unchanged in live file define('DB_SERVER_PASSWORD', 'pass'); //changed DB info for posting - unchanged in live file define('DB_DATABASE', 'dbname'); //changed DB info for posting - unchanged in live file define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?>
Guest Posted May 8, 2009 Posted May 8, 2009 sorry about the above MESS I was editing to remove code tags and color change notes and i guess edit time expired. so here is a better readable copy. includes/configure.php <?php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTPS_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'bestglobalhost.com'); define('HTTPS_COOKIE_DOMAIN', 'bestglobalhost.com'); define('HTTP_COOKIE_PATH', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('HTTPS_COOKIE_PATH', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('DIR_WS_HTTP_CATALOG', '/htdocs/'); //was '/osc/' changed to '/htdocs/' define('DIR_WS_HTTPS_CATALOG', '/htdocs/'); // was '/osc/' changed to '/htdocs/' 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/web02/b/bestglobalhost.com/user/htdocs/'); //deleted osc/ from end of string, define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xx.xx.xx.xx'); // deleted Db info for posting - unchanged in live file define('DB_SERVER_USERNAME', 'username'); // deleted Db info for posting - unchanged in live file define('DB_SERVER_PASSWORD', 'pass'); // deleted Db info for posting - unchanged in live file define('DB_DATABASE', 'dbname'); // deleted Db info for posting - unchanged in live file define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> admin/includes/configure.php <?php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTP_CATALOG_SERVER', 'http://bestglobalhost.com'); define('HTTPS_CATALOG_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/web02/b/bestglobalhost.com/user/htdocs/'); // deleted osc/ from end of string define('DIR_WS_ADMIN', '/admin/'); // was '/osc/admin/' - deleted /osc, do I need to replace /osc with /htdocs? define('DIR_FS_ADMIN', '/home/web02/b/bestglobalhost.com/user/htdocs/admin/'); //was htdocs/osc/admin - deleted osc/ define('DIR_WS_CATALOG', '/htdocs/'); // was '/osc/' - changed to '/htdocs/' define('DIR_FS_CATALOG', '/home/web02/b/bestglobalhost.com/user/htdocs/'); // removed osc/ from end of string 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('DB_SERVER', 'xx.xx.xx.xx'); //changed DB info for posting - unchanged in live file define('DB_SERVER_USERNAME', 'username'); //changed DB info for posting - unchanged in live file define('DB_SERVER_PASSWORD', 'pass'); //changed DB info for posting - unchanged in live file define('DB_DATABASE', 'dbname'); //changed DB info for posting - unchanged in live file define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?>
BryceJr Posted May 8, 2009 Posted May 8, 2009 Here are the changes. includes/configure.php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTPS_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', '.bestglobalhost.com'); define('HTTPS_COOKIE_DOMAIN', '.bestglobalhost.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/home/web02/b/bestglobalhost.com/user/htdocs/'); admin/includes/configure.php define('HTTP_SERVER', 'http://bestglobalhost.com'); define('HTTP_CATALOG_SERVER', 'http://bestglobalhost.com'); define('HTTPS_CATALOG_SERVER', 'http://bestglobalhost.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/web02/b/bestglobalhost.com/user/htdocs/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/home/web02/b/bestglobalhost.com/user/htdocs/admin/'); define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', '/home/web02/b/bestglobalhost.com/user/htdocs/'); HTDOCS is your root directory/folder and is denoted with a forward slash /. It is usually refered to simply as root.
Guest Posted May 8, 2009 Posted May 8, 2009 Here are the changes.includes/configure.php define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); admin/includes/configure.php define('DIR_WS_CATALOG', '/'); great thank you these were the problems I had /htdocs/ not knowing that the root is simply / so now I have my .css back However I still have the error message on the top of the page: Warning: I am able to write to the configuration file: /home/web02/b/bestglobalhost.com/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. my permission are set to 644 (owner, group, everyone - read, owner write) I tried changing the permission in my FTP file manager to read only for all but it will not take the change. any idea how to resolve this error?
bkellum Posted May 8, 2009 Posted May 8, 2009 great thank you these were the problems I had /htdocs/ not knowing that the root is simply / so now I have my .css back However I still have the error message on the top of the page: Warning: I am able to write to the configuration file: /home/web02/b/bestglobalhost.com/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. my permission are set to 644 (owner, group, everyone - read, owner write) I tried changing the permission in my FTP file manager to read only for all but it will not take the change. any idea how to resolve this error? The knowledge base in this forum could answer all of your questions that you had above including this permission question. Hint: Try 444 instead. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Guest Posted May 8, 2009 Posted May 8, 2009 However I still have the error message on the top of the page:Warning: I am able to write to the configuration file: /home/web02/b/bestglobalhost.com/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. my permission are set to 644 (owner, group, everyone - read, owner write) I tried changing the permission in my FTP file manager to read only for all but it will not take the change. any idea how to resolve this error? so I found this thread for changing write check permissions in /catalog/includes/header.php - lines 20 - 25 from this // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } to this // Following check commented out, was checking too "hard" on the permissions, and needed a 444 to remove warning message // check if the configure.php file is writeable // if (WARN_CONFIG_WRITEABLE == 'true') { // if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { // $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); // } // } // New code replacement, only issue warning msg if either world or group has write permissions $world_group_write = '0'; if (fileperms($filename) & 2) //check for world write { $world_group_write = '1'; } if (fileperms($filename) & 16) //check for group write { $world_group_write = '1'; } // check if the configure.php file is writeable, but only for world or group if (WARN_CONFIG_WRITEABLE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) { if ($world_group_write == '1') { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } } or this // New code replacement, only issue warning msg if either world or group has write permissions $world_group_write = '0'; if (fileperms($filename) & 2) //check for world write { $world_group_write = '1'; } if (fileperms($filename) & 16) //check for group write { $world_group_write = '1'; } everyone replying says it worked like a charm but I am a little hesitant as all the "works great" replies are from member with few posts which makes me wonder if they really know what they are talking about. except for the bottom code just above was posted by a user with 1500+ posts on the forum. just wondering what you think? So far the only way I can actually change the permissions of the file to 444 is to contact my hosting company and have them do it. (been through that last week) for another permissions problem.
Guest Posted May 8, 2009 Posted May 8, 2009 The knowledge base in this forum could answer all of your questions that you had above including this permission question. Hint: Try 444 instead. thanks for the input but I was having no luck finding the info in the knowledge base. maybe I just was not searching the correct terms/words. on the flip side your hint for 444. re-read my post. I stated that I had tried to change the permission to read only for all (ie 444) I just did not post 444. as well, I also said that my FTP file manager will not allow me to change permissions for some STUPID reason. it will tell you it took the chmod but then when you refresh/logout and back in and check it does not actually change it. been through that last week with another perm issue and had to call my hosting company and have them change the perms. STUPID I know and I don't understand why they don't just config to allow me to do it but that's the way it is.
BryceJr Posted May 8, 2009 Posted May 8, 2009 so I found this thread for changing write check permissions in /catalog/includes/header.php - lines 20 - 25 from this // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } to this // Following check commented out, was checking too "hard" on the permissions, and needed a 444 to remove warning message // check if the configure.php file is writeable // if (WARN_CONFIG_WRITEABLE == 'true') { // if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { // $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); // } // } // New code replacement, only issue warning msg if either world or group has write permissions $world_group_write = '0'; if (fileperms($filename) & 2) //check for world write { $world_group_write = '1'; } if (fileperms($filename) & 16) //check for group write { $world_group_write = '1'; } // check if the configure.php file is writeable, but only for world or group if (WARN_CONFIG_WRITEABLE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) { if ($world_group_write == '1') { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } } or this // New code replacement, only issue warning msg if either world or group has write permissions $world_group_write = '0'; if (fileperms($filename) & 2) //check for world write { $world_group_write = '1'; } if (fileperms($filename) & 16) //check for group write { $world_group_write = '1'; } everyone replying says it worked like a charm but I am a little hesitant as all the "works great" replies are from member with few posts which makes me wonder if they really know what they are talking about. except for the bottom code just above was posted by a user with 1500+ posts on the forum. just wondering what you think? So far the only way I can actually change the permissions of the file to 444 is to contact my hosting company and have them do it. (been through that last week) for another permissions problem. The best way to change permission is to log in and use your webhost control panel. >>Here is an alternative. It'll work for linux/unix based servers too.
Guest Posted May 8, 2009 Posted May 8, 2009 The best way to change permission is to log in and use your webhost control panel. >>Here is an alternative. It'll work for linux/unix based servers too. thanks for the help Bryce that is why I asked because I am not comfortable with changing the code for security reasons. I'll check my cpanel instead of the FTP file manager. as well look at the link I'll get it one way or another even if I have to call the hosting company. :angry:
bkellum Posted May 8, 2009 Posted May 8, 2009 thanks for the help Brycethat is why I asked because I am not comfortable with changing the code for security reasons. I'll check my cpanel instead of the FTP file manager. as well look at the link I'll get it one way or another even if I have to call the hosting company. :angry: Yes, Bryce is correct. You should be changing your permissions through your host's cpanel account. http://oscommerce.info/kb/224 Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Recommended Posts
Archived
This topic is now archived and is closed to further replies.