aspiringarts Posted February 13, 2005 Share Posted February 13, 2005 Bobby, question on the seo_redirect patch. In which directory should it be placed? Catalog, or root? Sorry to seem so dense, but I don't see info on that anywhere, either on the contrib page or on the forum. Thanks, Susan Quote Link to comment Share on other sites More sharing options...
clarocque Posted February 13, 2005 Share Posted February 13, 2005 Bobby, question on the seo_redirect patch. In which directory should it be placed? Catalog, or root? Sorry to seem so dense, but I don't see info on that anywhere, either on the contrib page or on the forum. Thanks, Susan <{POST_SNAPBACK}> Susan it goes in the includes folder.... Maybe Bobby was not clear on that: INSTALL Step #1: Upload this file to your catalog/includes/ directory. ;) Chris Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 13, 2005 Share Posted February 13, 2005 Hi Bobby I was going to upload to froogle but when looking at the links in excell I have the following link http://www.oldworldcharms.net/catalog/prod.../products_id/45 My site is now http://oldworldcharms.net If I add the address to the address bar it goes to the search page - product not found. Any ideas on how I can fix this? thanks Elizabeth Susan it goes in the includes folder....Maybe Bobby was not clear on that: INSTALL Step #1: Upload this file to your catalog/includes/ directory. ;) Chris <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
Sincraft Posted February 13, 2005 Share Posted February 13, 2005 Hey Bobby, Now that we have cleared up that everything seems to be functioning properly. Should I upgrade from 1.4 > 2.0? :) S Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted February 13, 2005 Share Posted February 13, 2005 First, don't come onto my thread like you know what you're talking about. Have you tested your server load on a store with 1,000 products? With 5,000 products? The fact is your code is not scalable. Have your tried to EXPLAIN your queries? Do you have any idea of what your contribution will do to a store with more than a few products and even moderate traffic? It will bring it to its knees. Period. Secondly, you think your URL formation is better than the method I chose but that is your opinion. Do you have data to back up that claim? Hold on...DMOZ uses it so it must be correct. You ignorant fool...they use that method of URLs because it is truly a flat file data structure they utilize. Do your damn homework before you come to me with an attitude. DMOZ uses a Berkley database and generates static HTML files and directories. So, that is a true directory structure. Guess what? Google uses the same flat file stucture. There is a saying: it is best to keep you mouth closed and be thought of as a dipshit than to open it and remove all doubt. Are you kidding or just not facing reality?? The majority of store owners are on a shared server where every mb of memory is managed. It doesn't matter? You have lost your mind. hhhmmm...how many store owners are PHP developers? Once again, you are out of touch with who is actually using your contribution. Maybe you do find the page cache script buggy...but then again a real developer would fix it and upload a better version. Instead of bitching about it why not put your code where your mouth is and do a better job? What? You can't fix it? Then STFU. Bobby <{POST_SNAPBACK}> Ok fine i'm a php programer that has over 100+ websites and my company makes over 1 million usd a month through website sales not to mention 200,000 usd i made over xmas selling motorbikes. you must have some pretty lame ass or over loaded servers that cant match 2 arrays together! I think i know what I'm talking about! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2005 Share Posted February 13, 2005 Ok fine i'm a php programer that has over 100+ websites and my company makes over 1 million usd a month through website sales not to mention 200,000 usd i made over xmas selling motorbikes. you must have some pretty lame ass or over loaded servers that cant match 2 arrays together! I think i know what I'm talking about! <{POST_SNAPBACK}> OK Daniel...I know everyone needs to learn about PHP so I'm going to take the time and explain to you why your contribution will bring a server to its knees. In application_top.php you want them to paste this code: if((trim($PHP_SELF, '/') == trim(DIR_WS_HTTP_CATALOG.FILENAME_DEFAULT, '/'))and(sizeof($url_array) > 0)){ $vars_array = $url_rewrite->get_vars($url_array); for ($i=0, $n=sizeof($vars_array); $i<$n; $i++) { $HTTP_GET_VARS[$vars_array[$i]['key']] = $vars_array[$i]['value']; } } The part that will bring a server to its knees is $url_rewrite->get_vars($url_array). Why? Take a look at the pertinent class functions: $categories_query = tep_db_query("select categories_id, categories_name from " . TABLE_CATEGORIES_DESCRIPTION); while($categories = tep_db_fetch_array($categories_query)){ $categories_array[] = array('id' => $categories['categories_id'], 'name' => $this->strip($categories['categories_name'])); } Uh oh...a big problem. Can anyone see it? I know you can since it is a beginners mistake. It is pulling every row in the categories_description table. It does not limit it to certain categories_id range or even a language. This means that if a store owner has the 3 default languages and 1,000 categories that query will LOCK THE TABLE while it scans the entire table (3,000 rows). What happens if another customer wants to view a category or product? You guessed it...that customer will have to wait until the table lock is removed before their query is executed. The effect is not very pronounced on a site with only a few concurrent vistitors but what about those stores with 10-15 concurrent customers? 25-50? The wait time could reach into the 10 seconds range. Nice way to drive customers away from the store... OK...now moving on to the next block: // Get the manufacturer variables $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS); while($manufacturers = tep_db_fetch_array($manufacturers_query)){ $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'name' => $this->strip($manufacturers['manufacturers_name'])); } Uh oh...same beginners mistake. This part of the code scans each row in the manufacturers table. Now, a typical store will have no more than 50-100 manufacturers so this one isn't as bad as the categories. However, it is bad PHP programming to scan an entire table on each page request. Let's keep going...look at this one: $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION); while($products = tep_db_fetch_array($products_query)){ $products_array[] = array('id' => $products['products_id'], 'name' => $this->strip($products['products_name'])); } WOW! Now I've seen some bad queries in my life but that is the worst osCommerce query that can be executed. Why? What happens if a store has 10,000 products? Given that store has the 3 default languages installed it will scan 30,000 rows (the entire table). Once again...this is a beginner's mistake and a bad one at that. Now, remember that these code blocks are executed on each page request other than the index. Do you realize what an entire table scan on the categories_description, manufacturers, and products_descriptions tables ON EACH PAGE REQUEST will do to the server load??? As a self proclaimed PHP expert I'm very surprised you didn't realize this while your fingers were typing away creating that monstrosity of a class. Now that I've educated you in the specific reasons that your code is not scalable, or enterprise level let me address your reply point by point. I hope you enjoyed your lesson in PHP programming. :) Ok fine i'm a php programer that has over 100+ websites and my company makes over 1 million usd a month through website sales not to mention 200,000 usd i made over xmas selling motorbikes.... It does not matter how much money you make. I could not care less. I have found that when someone boasts of their financial assets they are usually telling a lie and is most likely compensating for some shortcoming. In this case, I believe that you are trying to compensate for your amateur level PHP coding by telling tales of financial greatness. Once again, it doesn't matter since your financial interests were never in question...you felt the need to bring it up. Why? I have no idea since it is not even close to being related to the topic of your server resource intensive script NOR does it provide any validity to your position. you must have some pretty lame ass or over loaded servers that cant match 2 arrays together! No...my servers are neither "lame ass" or overloaded. The problem is not in matching 2 arrays. The rather HUGE problem is with how you create those arrays. Your level of knowledge did not allow you to realize the impact your contribution would have on a server and thus it makes perfect sense that it would also lead you to think the issue was matching 2 arrays. It does disturb me that as a self proclaimed PHP expert you would not realize what exactly your code does. I think i know what I'm talking about! ...and this is the final problem. You THINK you know what you're talking about but in reality you have no clue. I tell you your code is not scalable and directly address your other amateur comments. Do you rebuttal with fact? No....you tell me how much money you supposedly make. Well...Daniel...I have given you specific points about your code and some education on writing scalable code. At this point you will either come back with a technical rebuttal on why I'm wrong (and you know I'm correct) or you'll post another off-topic reply (maybe this time you'll tell us how much your wife supposedly makes). Either way your code is not scalable and will bring a server to its knees. This was my original comment and is still my assessment. Prove me wrong. BTW, I enjoy a good debate especially when my position will thoroughly abuse the receiving party. I hope you will try and respond with intelligence so we can continue this discussion. Maybe we should take this to a dedicated thread and keep it off our support threads? Bobby Quote Link to comment Share on other sites More sharing options...
Sincraft Posted February 13, 2005 Share Posted February 13, 2005 (slowly slinks out of the room after he drops a note on the floor which reads) can't..we...all..get...along..? :( S Quote Link to comment Share on other sites More sharing options...
Yuck Posted February 13, 2005 Share Posted February 13, 2005 (edited) A while ago I asked if is was normal to have stuff like this at the end of urls? &osCsid=a5d997d087dfc4807d85c942d4f2eedb I have this contrib running in cName mode as my hosting doesn't seem to like rewrite. I have installed exactly to the instructions and my store is in the root. I get that in my browser, not google stuff that I don't yet fully understand. Can someone please let me know if that should be there in my browser for categories and products? If not, is there a setting that I may have messed up? Thanks in advance. /edit Do any of these settings need changing for example? Session Directory /tmp Force Cookie Use False Check SSL Session ID False Check User Agent False Check IP Address False Prevent Spider Sessions False Recreate Session False Edited February 13, 2005 by Yuck Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2005 Share Posted February 13, 2005 A while ago I asked if is was normal to have stuff like this at the end of urls? &osCsid=a5d997d087dfc4807d85c942d4f2eedb I have this contrib running in cName mode as my hosting doesn't seem to like rewrite. I have installed exactly to the instructions and my store is in the root. I get that in my browser, not google stuff that I don't yet fully understand. Can someone please let me know if that should be there in my browser for categories and products? If not, is there a setting that I may have messed up? Thanks in advance. /edit Do any of these settings need changing for example? Session Directory /tmp Force Cookie Use False Check SSL Session ID False Check User Agent False Check IP Address False Prevent Spider Sessions False Recreate Session False <{POST_SNAPBACK}> It is normal to have the osCsid appended on first click when visiting the store. However, from the second and subsequent clicks it should be pulled from the cookie (except if browser cookies are disabled). Change these settings: Prevent Spider Sessions True Recreate Session True I would change the Recreate Session since you have not prevented the session_id's from being indexed. This will help eliminate the passing of mass SID's :) Bobby Quote Link to comment Share on other sites More sharing options...
royalfunk Posted February 13, 2005 Share Posted February 13, 2005 I am still having an issue with spiders and seo software. The contribution appears to be working correctly in rewrite mode, but when a spider or seo software tries to analyze the page, it sees absolutely nothing. It's wierd because the pages are geenrated fine, and the HTML code is fully in tact. I have worked with Fourbit (Paul), from this thread as well as our server tech and none of us have been able to come up with an answer as to what is being done incorrectly. I am begging and pleading for assistance to resolve this matter and see if it is something in the contribution, or something with the server. Any help is greatly appreciated. :'( Thanks, Aaron Quote Link to comment Share on other sites More sharing options...
Yuck Posted February 13, 2005 Share Posted February 13, 2005 It is normal to have the osCsid appended on first click when visiting the store. However, from the second and subsequent clicks it should be pulled from the cookie (except if browser cookies are disabled). Change these settings: Prevent Spider Sessions True Recreate Session True I would change the Recreate Session since you have not prevented the session_id's from being indexed. This will help eliminate the passing of mass SID's :) Bobby <{POST_SNAPBACK}> Thanks very much, I now have much shorter urls, much appreciated :thumbsup: Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2005 Share Posted February 13, 2005 I am still having an issue with spiders and seo software. The contribution appears to be working correctly in rewrite mode, but when a spider or seo software tries to analyze the page, it sees absolutely nothing. It's wierd because the pages are geenrated fine, and the HTML code is fully in tact. I have worked with Fourbit (Paul), from this thread as well as our server tech and none of us have been able to come up with an answer as to what is being done incorrectly. I am begging and pleading for assistance to resolve this matter and see if it is something in the contribution, or something with the server. Any help is greatly appreciated. :'( Thanks, Aaron <{POST_SNAPBACK}> It is hard to debug an issue that is not reproduceable. On every other site that is using the contribution this is not an issue. Your problem could be in the server setup or other conflicting contributions. Where it is exactly is beyond me as I don't know anything about which contributions you have installed. Bobby Quote Link to comment Share on other sites More sharing options...
aspiringarts Posted February 14, 2005 Share Posted February 14, 2005 INSTALL ?Step #1: ? Upload this file to your catalog/includes/ directory. ;) Chris <{POST_SNAPBACK}> Chris, where on earth did you find that??? It's not written on the Contributions page, and the zip file unzips straight to the seo_redirect.php file. Let me know, because I'm feeling blind at the moment!!!! Thanks, Susan P.S. Bobby - why expend so much energy on this other guy? Your contrib is clearly better (as someone who has tried both). It's not too cool of him to try to come into your thread and promote his contribution. There's no financial benefit to either of you (except if someone like me is so thankful they voluntarily paypal you), so there's no point in competing. The best contribution will stand on its own merit. Quote Link to comment Share on other sites More sharing options...
clarocque Posted February 14, 2005 Share Posted February 14, 2005 Chris, where on earth did you find that??? It's not written on the Contributions page, and the zip file unzips straight to the seo_redirect.php file. Let me know, because I'm feeling blind at the moment!!!! Thanks, Susan P.S. Bobby - why expend so much energy on this other guy? Your contrib is clearly better (as someone who has tried both). It's not too cool of him to try to come into your thread and promote his contribution. There's no financial benefit to either of you (except if someone like me is so thankful they voluntarily paypal you), so there's no point in competing. The best contribution will stand on its own merit. <{POST_SNAPBACK}> It is in Install directions in the top pf the file. Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 The beta-2 release of the automatic redirect script has been uploaded here: http://www.oscommerce.com/community/contributions,2823 It has been completely recoded from the ground up... To install just upload and add one line of code to application_top.php. The cut-n-paste install directions are in the file. The upgrade just overwrite the old redirect script. We're getting closer to the final release...need more feedback. Bobby Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 The beta-2 release of the automatic redirect script has been uploaded here: http://www.oscommerce.com/community/contributions,2823 It has been completely recoded from the ground up... To install just upload and add one line of code to application_top.php. The cut-n-paste install directions are in the file. The upgrade just overwrite the old redirect script. We're getting closer to the final release...need more feedback. Bobby <{POST_SNAPBACK}> Well I tried to install it, I went SLOWLY through all the steps double checking along the way and.... 1146 - Table 'reesy_oscommerce.cache' doesn't exist DELETE FROM cache WHERE cache_expires <= '2005-02-14 12:25:52' [TEP STOP] Ive checked this thread and you suggested reinstalling the database backup and trying again, I checked the database backup and there never was a table called cache so I cant reinstall something that isnt there. hmmmm Any suggestions please before I rollback this install? Thanks James Quote Link to comment Share on other sites More sharing options...
clarocque Posted February 14, 2005 Share Posted February 14, 2005 Well I tried to install it, I went SLOWLY through all the steps double checking along the way and.... 1146 - Table 'reesy_oscommerce.cache' doesn't exist DELETE FROM cache WHERE cache_expires <= '2005-02-14 12:25:52' [TEP STOP] Ive checked this thread and you suggested reinstalling the database backup and trying again, I checked the database backup and there never was a table called cache so I cant reinstall something that isnt there. hmmmm Any suggestions please before I rollback this install? Thanks James <{POST_SNAPBACK}> James, I have not even loaded the file and looked at it yet, but if it is calling for a cache table you need to have the cache class installed. Make sure you have the lates Ultimiate SEO, it has cache clase in it.... Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 James, I have not even loaded the file and looked at it yet, but if it is calling for a cache table you need to have the cache class installed. Make sure you have the lates Ultimiate SEO, it has cache clase in it.... <{POST_SNAPBACK}> Hi, Im using the latest Ultimate SEO as of today, and followed the install instructions step... 4 (1a) IF YOU DO NOT HAVE PAGE CACHE INSTALLED REPLACE WITH THIS CODE: Quote Link to comment Share on other sites More sharing options...
clarocque Posted February 14, 2005 Share Posted February 14, 2005 Hi, Im using the latest Ultimate SEO as of today, and followed the install instructions step... 4 (1a) IF YOU DO NOT HAVE PAGE CACHE INSTALLED REPLACE WITH THIS CODE: <{POST_SNAPBACK}> I am not talking about page cache, I am talking about the cache class... STEP 2 - Install the database settings... you are missing that database table that is created w/ this. Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 I am not talking about page cache, I am talking about the cache class...STEP 2 - Install the database settings... you are missing that database table that is created w/ this. <{POST_SNAPBACK}> Yes you were right! I forgot that step even though I was being so careful :'( After this I got a couple of parse errors unexpected '}' in html_output, I removed those and that seemed to fix that only for it to give a fatal error Fatal error: Call to undefined function: tep_get_parent_categories() in /home/reesy/public_html/shop/includes/seo_cache.php on line 175 Quote Link to comment Share on other sites More sharing options...
NerioDavid Posted February 14, 2005 Share Posted February 14, 2005 It is normal to have the osCsid appended on first click when visiting the store. However, from the second and subsequent clicks it should be pulled from the cookie (except if browser cookies are disabled). Change these settings: Prevent Spider Sessions True Recreate Session True I would change the Recreate Session since you have not prevented the session_id's from being indexed. This will help eliminate the passing of mass SID's :) Bobby <{POST_SNAPBACK}> Where can I change the settings? Quote Link to comment Share on other sites More sharing options...
clarocque Posted February 14, 2005 Share Posted February 14, 2005 Where can I change the settings? <{POST_SNAPBACK}> Admin >Configuration >Sessions Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
clarocque Posted February 14, 2005 Share Posted February 14, 2005 Yes you were right!I forgot that step even though I was being so careful :'( After this I got a couple of parse errors unexpected '}' in html_output, I removed those and that seemed to fix that only for it to give a fatal error Fatal error: Call to undefined function: tep_get_parent_categories() in /home/reesy/public_html/shop/includes/seo_cache.php on line 175 <{POST_SNAPBACK}> Are you saying you are getting that error now? Why did you have extra } in html output? Quote osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 Where can I change the settings? <{POST_SNAPBACK}> Thats in your admin section. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2005 Share Posted February 14, 2005 (edited) Are you saying you are getting that error now? Why did you have extra } in html output? <{POST_SNAPBACK}> Yes I was getting that error, I dont know why so I played it safe and uninstalled the thing. Ive no idea why the extra } were there I just cut and pasted the details as instructed. I might contact Bobby to see if he would be interested in installing this for me - I think this is the safest way forward. Edited February 14, 2005 by Reesy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.