AlanR Posted December 16, 2005 Share Posted December 16, 2005 The reason they don't show up (on some servers) is because there is a .htaccess file in the includes folder. # $Id: .htaccess,v 1.4 2001/04/22 20:30:03 dwatkins Exp $ # # This is used with Apache WebServers # The following blocks direct HTTP requests in this directory recursively # For this to work, you must include the parameter 'Limit' to the AllowOverride configuration # # Example: # #<Directory "/usr/local/apache/htdocs"> # AllowOverride Limit # # 'All' with also work. (This configuration is in your apache/conf/httpd.conf file) # This does not affect PHP include/require functions # # Example: http://server/catalog/includes/application_top.php will not work <Files *.php> Order Deny,Allow Deny from all </Files> The purpose of this file is to prevent outsiders from directly accessing .php files in /includes, a security measure. You've got two options. 1) remove/rename the .htaccess file 2) move /languages out of and up to the same level as includes. You'll need to edit /catalog/includes/configure.php if you choose option 2 Like so... from: define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); to: define('DIR_WS_LANGUAGES', 'languages/'); The php files within /languages are pretty harmless and no one can do much damage if they can access them. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
AlanR Posted December 18, 2005 Author Share Posted December 18, 2005 If you choose to move /languages out of /includes as per option No. 2 above you'll also need to edit the location in admin/includes/configure.php From: define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); to: define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'languages/'); Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
Guest Posted December 20, 2005 Share Posted December 20, 2005 Hi Alan, so I saw another post about it and was wondering, why the .gif or .jpg files won't be accessible since the .htaccess filters only the php files. I mean I am using something like that, all my images are accessible by the scripts. Of course you cannot browse the image directories which is what I was aiming to do. Is there a setting on some servers that trigers restrictions on all files when you specify the *.php? Link to comment Share on other sites More sharing options...
AlanR Posted December 28, 2005 Author Share Posted December 28, 2005 Hi Alan, so I saw another post about it and was wondering, why the .gif or .jpg files won't be accessible since the .htaccess filters only the php files. I mean I am using something like that, all my images are accessible by the scripts. Of course you cannot browse the image directories which is what I was aiming to do. Is there a setting on some servers that trigers restrictions on all files when you specify the *.php? I can't say why some servers have problems with the .gif and .jpg files when the directive is for .php The servers I use don't have the problem so I'd have to have access to one that does to try and find out. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
blessed Posted February 16, 2006 Share Posted February 16, 2006 I tried this and no success. I've deleted the file and it made no difference. When I moved the languages folder the whole site went down..lol... any suggestions? Link to comment Share on other sites More sharing options...
baalwww Posted March 2, 2006 Share Posted March 2, 2006 If you choose to move /languages out of /includes as per option No. 2 above you'll also need to edit the location in admin/includes/configure.php From: define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); to: define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'languages/'); Alan, I tried both, and then both together, which of course shouldn't matter. Nada. I know the move and edit of configure worked, since the site looked fine afterwards (aside from the buttons still not appearing). The rename of .htaccess did nothing either. I made a button appear for the login box on my column_left by doing the following, but I'd hate to have to do this everywhere...there must be a better way! FROM " . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . " TO . "<input type=\"image\" src=\" " . DIR_WS_LANGUAGES . $value['directory'] . $language . "/images/buttons/button_login.gif\" Link to comment Share on other sites More sharing options...
baalwww Posted March 6, 2006 Share Posted March 6, 2006 Alan, I tried both, and then both together, which of course shouldn't matter. Nada. I know the move and edit of configure worked, since the site looked fine afterwards (aside from the buttons still not appearing). The rename of .htaccess did nothing either. I made a button appear for the login box on my column_left by doing the following, but I'd hate to have to do this everywhere...there must be a better way! FROM " . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . " TO . "<input type=\"image\" src=\" " . DIR_WS_LANGUAGES . $value['directory'] . $language . "/images/buttons/button_login.gif\" No takers. OK, will somebody please tell me where tep_image_submit is defined? Maybe I can figure out the problem by looking at it. Link to comment Share on other sites More sharing options...
Gtechosting Posted March 9, 2006 Share Posted March 9, 2006 Hello all, I renamed the .htaccess file to DOTHTACCESS and this worked as a temporary measure.... windows servers for you i guess... Anyways, guess i better do it right if i want it secure... :D Thanks again alanr Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2006 Share Posted June 18, 2006 I had this problem and I think I found a better solution other than removing .htaccess or moving the languages folder... If you notice the .htaccess file says... # For this to work, you must include the parameter 'Limit' to the AllowOverride configuration If you add "Limit" to the AllowOverride configuration for whatever path your "catalog/includes" directory falls under, this .htaccess file should work properly, and you still should not be able to access the .php files via your web browser that are in the "includes" directories/sub-directories. Try it. Hope that helps. Link to comment Share on other sites More sharing options...
mint suite Posted June 19, 2006 Share Posted June 19, 2006 If you add "Limit" to the AllowOverride configuration for whatever path your "catalog/includes" directory falls under, this .htaccess file should work properly, and you still should not be able to access the .php files via your web browser that are in the "includes" directories/sub-directories. erm.... how do I do that? - I've tried all of the other suggestions and nothings worked so far. Link to comment Share on other sites More sharing options...
Guest Posted June 23, 2006 Share Posted June 23, 2006 You have to edit your apache config file in order to add Limit to the AllowOverride part of your oscommerce installation. Do you have access to the apache configuration file on your server? Link to comment Share on other sites More sharing options...
Paula Moss Posted July 4, 2006 Share Posted July 4, 2006 I do have the .htaccess in my catalog and in my catalog/includes. I can see these two .htaccess in my admin file manager. I can not see them in my ftp program. Therefore, I am unable to change the file attributes so that I may delete the .htaccess. How can I go about deleting it then? Link to comment Share on other sites More sharing options...
Paula Moss Posted July 4, 2006 Share Posted July 4, 2006 I do have the .htaccess in my catalog and in my catalog/includes. I can see these two .htaccess in my admin file manager. I can not see them in my ftp program. Therefore, I am unable to change the file attributes so that I may delete the .htaccess. How can I go about deleting it then? I can now see the .htaccess files on my ftp program. (Had to activate the "show hidden files".) I changed the file attributes and then went into admin>file manager to delete the file. I got this error: Warning: unlink(/var/virtual/web/w1619/html/catalog//includes/.htaccess): Permission denied in /var/virtual/web/w1619/html/catalog/admin/includes/functions/general.php on line 1031 Warning: Cannot modify header information - headers already sent by (output started at /var/virtual/web/w1619/html/catalog/admin/includes/functions/general.php:1031) in /var/virtual/web/w1619/html/catalog/admin/includes/functions/general.php on line 22 Line 1031 says: if (is_writeable($source)) { unlink($source);(This is line 1031) } else { $messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source), 'error'); $tep_remove_error = true; I went to line 1031, but I'm not sure what I need to do to it to enable me to have permission to delete it. Link to comment Share on other sites More sharing options...
Paula Moss Posted July 5, 2006 Share Posted July 5, 2006 DUH!! I am having a blonde moment! :blink: .htacess file has been deleted and images are now showing up! YAY!!!! Thank you!! Link to comment Share on other sites More sharing options...
sue76 Posted October 19, 2006 Share Posted October 19, 2006 I have the missing file problem... my delete and back button are missing... so how can I fix it up..???? Link to comment Share on other sites More sharing options...
Gameprodigy Posted October 31, 2006 Share Posted October 31, 2006 maybe I didnt read this correctly but the problem is missing buttons correct? the only image folders I know of are catalog/images catalog/includes/languages/english/images Both of the "Folders" should be CHMOD to 777, then only the images are accessable to all without any .htaccess You might just make sure that both those folders have the proper permissions before removing any files. Hope that helps Link to comment Share on other sites More sharing options...
stealthpaws Posted November 1, 2006 Share Posted November 1, 2006 agggggghhhhh- another noob to OSC- I have my store set up on GoDaddy, (haven't tried to set up .htaccess yet but there's an instruction page...) however, my button images won't show up. Here's what I've done: set catalogue/includes/languages/english/images and images/buttons to 777 checked the stylesheet ref...it's good. re-uploaded the button images from language/english/images in bianary deleted the includes/.htaccess file (after I tried renaming it) This site is my testing site, and it won't go live until I change my DNS. Link is http://www.saorsastudios.com/catalog Hosting: GoDaddy on linux, shared I have muddled through this entire set-yp even though I have never seen php before starting, thanks to the info. I've found here. This one I just can't figure out. Everything else seems to work just fine. Please help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.