Jammin Jamie Posted March 24, 2010 Share Posted March 24, 2010 I recently took over website admin for a friend because his search kept returning an error "1054 - Unknown column 'p.products_id" in 'on clause' .... I found your posting on that subject (http://www.oscommerce.com/forums/index.php?showtopic=230304/) and only had to fix the advance_search_result.php page to fix the error and the correct information to display properly. Now that that is fixed, the seach and back images are not displaying anymore!!! I know it is strange as the issues should not be related!! Here is the code on the page to call the images ... <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> and this is where the images reside on the site .. /includes/languages/english/images/buttons Can anyone assist me with getting the images to display??? Perhaps there was something I missed when updating the site? This occurs on several pages so I am not sure if it was a code change due to the database upgrade or was always a problem that is not related and I just happened to notice it when I fixed the error .. the site owner doesn't know. Thanks for your assistance! Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 26, 2010 Author Share Posted March 26, 2010 Can anyone out there help me with this???? It seems like it should be simple but I just can't get the images to show up!!! Thanks for any help you could give me! Jamie Link to comment Share on other sites More sharing options...
germ Posted March 27, 2010 Share Posted March 27, 2010 Can anyone out there help me with this???? It seems like it should be simple but I just can't get the images to show up!!! Thanks for any help you could give me! Jamie Check all these folders for a .htaccess file: /includes/languages/english/images/buttons If you find one rename it to text.htaccess to see if this helps. And be sure each of the aforementioned folders has 755 permissions. Lastlly, be sure the images in the /buttons folder have 644 permissions. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 27, 2010 Author Share Posted March 27, 2010 thanks for responding. I cannnot find a "rename" function in the oscemmerce system to allow me to rename the .htaccess file I found in the root site with all the site pages. I tried to just create a new file with the text.htaccess name however that didn't do anything. how do you rename a file in this system??? thanks again for your assistance! Jamie Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 27, 2010 Author Share Posted March 27, 2010 Can anyone out there help me with this???? It seems like it should be simple but I just can't get the images to show up!!! Thanks for any help you could give me! Jamie Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 27, 2010 Author Share Posted March 27, 2010 Can anyone out there help me with this???? It seems like it should be simple but I just can't get the images to show up!!! Thanks for any help you could give me! Jamie Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 27, 2010 Author Share Posted March 27, 2010 also, where do you set/check the permmissions on this system?? :) Link to comment Share on other sites More sharing options...
multimixer Posted March 27, 2010 Share Posted March 27, 2010 This all you do in your host cpanel, not the osCommerce admin My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 31, 2010 Author Share Posted March 31, 2010 Check all these folders for a .htaccess file: /includes/languages/english/images/buttons If you find one rename it to text.htaccess to see if this helps. And be sure each of the aforementioned folders has 755 permissions. Lastlly, be sure the images in the /buttons folder have 644 permissions. Link to comment Share on other sites More sharing options...
Jammin Jamie Posted March 31, 2010 Author Share Posted March 31, 2010 Thanks for the suggestions!! I've checked all the permissions and I've tried renaming the htaccess file as suggested, but I still cannot get the images to showup!!!!! I do show in the error log "unable to check htaccess file, ensure it is readable, ..." but the htacess file appears to be empty ... do you know what code should be in there??? How I can get a new clean, htaccess file??? Thanks for your assistance! Jamie Link to comment Share on other sites More sharing options...
germ Posted March 31, 2010 Share Posted March 31, 2010 Thanks for the suggestions!! I've checked all the permissions and I've tried renaming the htaccess file as suggested, but I still cannot get the images to showup!!!!! Any other suggestions? Thanks! Jamie Not unless you post the URL (or PM it to me) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 Not unless you post the URL (or PM it to me) Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 I do show in the error log "unable to check htaccess file, ensure it is readable, ..." but the htacess file appears to be empty ... do you know what code should be in there??? How I can get a new clean, htaccess file??? Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 Here is the site http://www.epstexas.com/advanced_search_result.php thanks again ! Link to comment Share on other sites More sharing options...
germ Posted April 1, 2010 Share Posted April 1, 2010 This is what I get when I attempt to access the image directly: Forbidden You don't have permission to access /includes/languages/english/images/buttons/button_search.gif on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request You haven't successfully done what I posted earlier. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 This is what I get when I attempt to access the image directly: You haven't successfully done what I posted earlier. Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 the permissions have been changed as requested. changing the htaccess file name didn't work so I changed it back .... do you want me to rename to text.htaccess ???? Full backup almost completed .... Anything else I can do to get the code to find the iamges?? Link to comment Share on other sites More sharing options...
germ Posted April 1, 2010 Share Posted April 1, 2010 The server is still telling me you haven't done what I posted. Until you do, it won't show. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 The server is still telling me you haven't done what I posted. Until you do, it won't show. Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 The server is still telling me you haven't done what I posted. Until you do, it won't show. Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 ok .. I guess I am not getting what you want me to do ... can you spell it out for me?? Backup - done permissions - done rename page from .htaccess to text.htaccess - done (it's in the root directory) What else??? The "quote" is your signature .. correct?? Link to comment Share on other sites More sharing options...
germ Posted April 1, 2010 Share Posted April 1, 2010 The permissions on the images in this folder: /includes/languages/english/images/buttons/ need to be 644 The permission on the folder istelf need to be 755 If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 public_html/includes/languages/english/images/button - 755 (each folder level is at 755) public_html/includes/languages/english/images/button/button_back.gif - 644 (also button_search.gif) is this what you need to check? Link to comment Share on other sites More sharing options...
germ Posted April 1, 2010 Share Posted April 1, 2010 <?php $dir = "includes/languages/english/images/buttons/"; if ( file_exists ( '.htaccess' ) ) { echo "root folder .htaccess Permissions = " . substr(sprintf('%o', fileperms('.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/.htaccess' ) ) { echo "/includes/.htaccess Permissions = " . substr(sprintf('%o', fileperms('includes/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/.htaccess' ) ) { echo "/includes/languages/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/.htaccess' ) ) { echo "/includes/languages/english/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/images/.htaccess' ) ) { echo "/includes/languages/english/images/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/images/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/images/buttons/.htaccess' ) ) { echo "/includes/languages/english/images/buttons/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/images/buttons/.htaccess')), -4) . "<br><br>"; } echo "includes Permissions = " . substr(sprintf('%o', fileperms('includes')), -4) . "<br><br>"; echo "includes/languages Permissions - " . substr(sprintf('%o', fileperms('includes/languages')), -4) . "<br><br>"; echo "includes/languages/english/images Permissions = " . substr(sprintf('%o', fileperms('includes/languages/english/images')), -4) . "<br><br>"; echo "includes/languages/english/images/buttons Permissions = " . substr(sprintf('%o', fileperms('includes/languages/english/images/buttons')), -4) . "<br><br>"; if (is_dir($dir)) { echo 'Contents<br>'; if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if ( filetype($dir . $file) == 'file' ) { echo $dir . $file . " Permissions = " . substr(sprintf('%o', fileperms($dir . $file)), -4) . "<br>"; } echo '<br><br>'; } closedir($dh); } } echo '<br><br>'; ?> Make a php file with the above contents. Put it in the root folder on your site. Access it with your browser. Copy/paste the output it creates into your next post. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jammin Jamie Posted April 1, 2010 Author Share Posted April 1, 2010 <?php $dir = "includes/languages/english/images/buttons/"; if ( file_exists ( '.htaccess' ) ) { echo "root folder .htaccess Permissions = " . substr(sprintf('%o', fileperms('.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/.htaccess' ) ) { echo "/includes/.htaccess Permissions = " . substr(sprintf('%o', fileperms('includes/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/.htaccess' ) ) { echo "/includes/languages/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/.htaccess' ) ) { echo "/includes/languages/english/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/images/.htaccess' ) ) { echo "/includes/languages/english/images/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/images/.htaccess')), -4) . "<br><br>"; } if ( file_exists ( 'includes/languages/english/images/buttons/.htaccess' ) ) { echo "/includes/languages/english/images/buttons/.htaccess Permissions = " . substr(sprintf('%o', fileperms('/includes/languages/english/images/buttons/.htaccess')), -4) . "<br><br>"; } echo "includes Permissions = " . substr(sprintf('%o', fileperms('includes')), -4) . "<br><br>"; echo "includes/languages Permissions - " . substr(sprintf('%o', fileperms('includes/languages')), -4) . "<br><br>"; echo "includes/languages/english/images Permissions = " . substr(sprintf('%o', fileperms('includes/languages/english/images')), -4) . "<br><br>"; echo "includes/languages/english/images/buttons Permissions = " . substr(sprintf('%o', fileperms('includes/languages/english/images/buttons')), -4) . "<br><br>"; if (is_dir($dir)) { echo 'Contents<br>'; if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if ( filetype($dir . $file) == 'file' ) { echo $dir . $file . " Permissions = " . substr(sprintf('%o', fileperms($dir . $file)), -4) . "<br>"; } echo '<br><br>'; } closedir($dh); } } echo '<br><br>'; ?> Make a php file with the above contents. Put it in the root folder on your site. Access it with your browser. Copy/paste the output it creates into your next post. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.