Jump to content
Latest News: (loading..)

phi148

Members
  • Content count

    232
  • Joined

  • Last visited

About phi148

  • Birthday 01/01/2006

Profile Information

Recent Profile Visitors

11,505 profile views
  1. View Counter

    Hi Jack, Today a hacker tried to use SQL injection on me. I received an email from view_counter telling me what IP to ban. However, then I noticed my website was down due to a change in the .htaccess file that view_counter made. The .htaccess file had this: deny from And that was all! Hence, my server raised an internal server error. Once I deleted the "deny from" it worked fine again. The email that was sent to me did have the IP address, so I went ahead and manually banned it. Do you know what went wrong here? Thanks
  2. Thank you. That makes sense. However, shouldn't the home page have a canonical link? The current code does NOT provide a canonical link for your homepage...
  3. So I was updating SEO on my site and then I noticed my main home page doesn't have a canonical link. I also noticed that category pages that contain more subcategories also do not have a canonical link. The code below from / includes/modules/header_tags/ht_canonical.php is what creates the canonical link. Can someone explain to me why the main index.php page and categories that don't have products are not included in this code? I would think they would still need canonical links.... function execute() { global $PHP_SELF, $cPath, $oscTemplate, $category_depth; if (basename($PHP_SELF) == 'product_info.php') { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('product_info.php', 'products_id=' . (int)$_GET['products_id'], 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } elseif (basename($PHP_SELF) == 'index.php') { if (isset($cPath) && tep_not_null($cPath) && ($category_depth == 'products')) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('index.php', 'view=all&cPath=' . $cPath, 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } elseif (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('index.php', 'view=all&manufacturers_id=' . (int)$_GET['manufacturers_id'], 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } } else { $view_all_pages = array('products_new.php', 'specials.php'); if (in_array(basename($PHP_SELF), $view_all_pages)) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link($PHP_SELF, 'view=all', 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } } }
  4. So I was updating SEO on my site and then I noticed my main home page doesn't have a canonical link. I also noticed that category pages that contain more subcategories also do not have a canonical link. The code below from / includes/modules/header_tags/ht_canonical.php is what creates the canonical link. Can someone explain to me why the main index.php page and categories that don't have products are not included in this code? I would think they would still need canonical links.... function execute() { global $PHP_SELF, $cPath, $oscTemplate, $category_depth; if (basename($PHP_SELF) == 'product_info.php') { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('product_info.php', 'products_id=' . (int)$_GET['products_id'], 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } elseif (basename($PHP_SELF) == 'index.php') { if (isset($cPath) && tep_not_null($cPath) && ($category_depth == 'products')) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('index.php', 'view=all&cPath=' . $cPath, 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } elseif (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link('index.php', 'view=all&manufacturers_id=' . (int)$_GET['manufacturers_id'], 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } } else { $view_all_pages = array('products_new.php', 'specials.php'); if (in_array(basename($PHP_SELF), $view_all_pages)) { $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link($PHP_SELF, 'view=all', 'NONSSL', false) . '" />' . PHP_EOL, $this->group); } } }
  5. Multi_Vendor_Shipping new thread

    I do have it operational after working with @Demitry on merging all the changes in. I think that Demitry may have been packaging up the changes to post an update to the community. I'm not sure if he has that ready yet or not. If not, it just takes patience, testing and merging ... but it does work :) I think MVS should be part of the base OSCommerce package in my opinion!
  6. View Counter

    Well, all the tables are UTF8_UNICODE_CI ... so I guess I don't need to convert? I did notice that all my tables use a different engine than the view_counter tables. (MyISAM vs InnoDB) not sure if that matters.. I tried a repair on those tables, and I received this response: "The storage engine for the table doesn't support repair" Thanks!
  7. View Counter

    Well, it happened again. This is very odd. I commented out the code, then manually executed the SQL queries and they ran fast as expected. Then I put the code back in, and the problem is gone again. I'm willing to bet by tomorrow I see the slowdown creep back in. Hmmm.
  8. View Counter

    Yea, seemed very odd to me too. Only thing I can think of is that maybe I had too many days of data being stored so I hit a timeout or something like that. I have since reduced the amount of time I keep the information and all seems well now with the code back on and activated. I'll keep you posted if I am able to reproduce it in the future. Thanks Jack!
  9. ADMIN incredibly slow. Please help!

    So I retract my statement, you had this issue called out spot on Jack :) It was a database process occurring
  10. View Counter

    Hi Jack, I installed this add-on a few weeks ago, and then all of a sudden my admin slowed down drastically. All admin pages. I narrowed down the problem to be here in admin/includes/application_top.php /***** Begin View Counter *****/ if (VIEW_COUNTER_ENABLED == 'true') { /**** BEGIN FORCE CLEAR THE TABLES ****/ if (VIEW_COUNTER_FORCE_RESET > 0) { $dateNow = @date("Y-m-d", time() - (VIEW_COUNTER_FORCE_RESET * 86400)) . ' 23:59:59'; tep_db_query("delete from " . TABLE_VIEW_COUNTER . " where last_date < '" . $dateNow ."' "); tep_db_query("optimize table " . TABLE_VIEW_COUNTER); } if (VIEW_COUNTER_FORCE_RESET_STORAGE > 0) { $dateNow = @date("Y-m-d", time() - (VIEW_COUNTER_FORCE_RESET_STORAGE * 86400)) . ' 23:59:59'; tep_db_query("delete from " . TABLE_VIEW_COUNTER_STORAGE . " where last_date < '" . $dateNow ."' "); tep_db_query("optimize table " . TABLE_VIEW_COUNTER_STORAGE); } /**** END FORCE CLEAR THE TABLES ****/ include(DIR_FS_CATALOG . 'includes/modules/' . 'view_counter.php'); } Each if block was taking 10 seconds each. Do you know why this may of just started happening and how I can get it to stop? (I simply disabled "view_counter" in admin and everything is running fast again) I'm running OSC 2.3.4 Edge. Thanks!! Bill
  11. ADMIN incredibly slow. Please help!

    @Jack_mcs I finally found the problem after putting in tons of timers. It actually is something to do with the "View Counter" add-on. Here is the code that was causing the delay in admin/application_top.php /***** Begin View Counter *****/ if (VIEW_COUNTER_ENABLED == 'true') { /**** BEGIN FORCE CLEAR THE TABLES ****/ if (VIEW_COUNTER_FORCE_RESET > 0) { $dateNow = @date("Y-m-d", time() - (VIEW_COUNTER_FORCE_RESET * 86400)) . ' 23:59:59'; tep_db_query("delete from " . TABLE_VIEW_COUNTER . " where last_date < '" . $dateNow ."' "); tep_db_query("optimize table " . TABLE_VIEW_COUNTER); } if (VIEW_COUNTER_FORCE_RESET_STORAGE > 0) { $dateNow = @date("Y-m-d", time() - (VIEW_COUNTER_FORCE_RESET_STORAGE * 86400)) . ' 23:59:59'; tep_db_query("delete from " . TABLE_VIEW_COUNTER_STORAGE . " where last_date < '" . $dateNow ."' "); tep_db_query("optimize table " . TABLE_VIEW_COUNTER_STORAGE); } /**** END FORCE CLEAR THE TABLES ****/ include(DIR_FS_CATALOG . 'includes/modules/' . 'view_counter.php'); } Each of those if blocks were taking about 10 seconds each. Probably should close this thread and post in your support thread instead :)
  12. ADMIN incredibly slow. Please help!

    Should the .htaccess file have TWO "AuthUserFile" entries? One if the directory is password protected and the second for the oscommerce .htpasswd_oscommerce configuration?
  13. ADMIN incredibly slow. Please help!

    Sorry Jack, nothing like that is going on. I found out the .htpasswd_oscommerce was missing (probably accidentally deleted) which was referenced by .htaccess so I thought I was home free. Nope, still have the issue even after restoring that file.
  14. Admin suddenly slow - cause & solution

    John, I'm experiencing the same problem. What exactly did you comment out for your test? Thanks!
  15. ADMIN incredibly slow. Please help!

    This is why I'm looking at .htaccess
×