dallasbird Posted April 7, 2015 Share Posted April 7, 2015 I recently installed kissER error handler on my 2.3.4 oscommerce site, which has been up for four years and I have made the updates from earlier versions. I am getting this error on many different items - Can anyone help - I cant' find any other threads on this subject - Thanks in advance: Error: Constant MODULE_BOXES_XMAS_SORT_ORDER already defined File: includes/application_top.php Line: 74 Line 74 in includes/application_top.php reads: define($configuration['cfgKey'], $configuration['cfgValue']); Link to comment Share on other sites More sharing options...
MrPhil Posted April 7, 2015 Share Posted April 7, 2015 Use grep (on Linux) or findstr (on Windows) to search for the string MODULE_BOXES_XMAS_SORT_ORDER in all your .php files. It shouldn't show up too many times. Find out where it is defined and figure out how it came to be defined twice. Did you have a failed installation, and installed a second time without properly removing all traces of the first install? If so, a file restore from backup, to where you were before you tried installing the add-on, might be the easiest fix. Link to comment Share on other sites More sharing options...
dallasbird Posted April 7, 2015 Author Share Posted April 7, 2015 It has been over a year since I moved to another server. My backups have been modified many times since then and since I just installed the error log, I don't know when this started. I use a mac so would I need to access grep on my terminal? I have connected to my server on the terminal, but i would not know the command? I have been trying to update as many files as possible to 2.3.4 with out breaking my add ons, header_tags SEO, Seo urls, xsell, wishlist, - not that many contributions. Any recommendations? and Thanks J Link to comment Share on other sites More sharing options...
burt Posted April 7, 2015 Share Posted April 7, 2015 define($configuration['cfgKey'], $configuration['cfgValue']); creates "constant" keys and values from the database. It is likely therefore, that the key MODULE_BOXES_XMAS_SORT_ORDER exists two times in the database. Make a backup copy of your Database, and search it for this key. Link to comment Share on other sites More sharing options...
dallasbird Posted April 7, 2015 Author Share Posted April 7, 2015 Hello Vanquisher of Demons!!! you were completely right. I had doubles in my database. I think I ran a couple of queries a couple of times, so now I have deleted and errors are gone, but there is still this, I am wondering if this is similar and something I can fix in the database. E_NOTICE Error Count: 15 Error: Undefined index: path File: includes/classes/seo.class.php Line: 2593 Error: Undefined index: path File: includes/classes/seo.class.php Line: 2629 Error: Undefined index: path File: includes/classes/seo.class.php Line: 2700 Error: Undefined index: path File: includes/classes/seo.class.php Line: 2730 Error: Undefined index: path File: includes/classes/seo.class.php Line: 2826 Error: Undefined variable: gv_contents_string File: includes/modules/boxes/bm_shopping_cart.php Line: 111 Error: Undefined index: manufacturers_id File: includes/header_tags.php Line: 35 Error: Undefined variable: args File: includes/functions/header_tags.php Line: 166 Error: Undefined index: creator File: includes/modules/header_tags_opengraph.php Line: 29 Error: Undefined index: count File: includes/kiss_error_handler.php Line: 296 Error: Undefined index: slowest File: includes/kiss_error_handler.php Line: 297 Error: Undefined index: total_time File: includes/kiss_error_handler.php Line: 298 Error: Undefined index: queries File: includes/kiss_error_handler.php Line: 300 Link to comment Share on other sites More sharing options...
nigelt74 Posted April 8, 2015 Share Posted April 8, 2015 What version of PHP is your store using? Link to comment Share on other sites More sharing options...
dallasbird Posted April 8, 2015 Author Share Posted April 8, 2015 php version 4.0.10.7 Link to comment Share on other sites More sharing options...
MrPhil Posted April 8, 2015 Share Posted April 8, 2015 Impossible. You can't run osC 2.3 on PHP 4.0. osC 2.3.4 is going to require something like PHP 5.3 or so as a minimum. Either you have misread your PHP level, or you have an incredibly mangled system. Run the following script: <?php phpinfo(); ?> to see what PHP version you really have. Link to comment Share on other sites More sharing options...
dallasbird Posted April 8, 2015 Author Share Posted April 8, 2015 oops you are correct it is running native 5.4 - there is an option to change it from 5.3 - 5.5 Link to comment Share on other sites More sharing options...
dallasbird Posted April 8, 2015 Author Share Posted April 8, 2015 I have further looked into this problem and what is happening is my site opens to mysite/oscommerce instead of mysite/oscommerce/index.php and this is where the errors are because when I open mysite/oscommerce/index.php the seo.php errors are not present. incl/filenames does site the default filename to be index.php so it goes there when you hit catalog. But I think this is something to do with my .htaccess specs for seo url stating my site opens with the index.php. Any one know about this? I am also asking Jack. Link to comment Share on other sites More sharing options...
MrPhil Posted April 9, 2015 Share Posted April 9, 2015 It sounds like you might have a server misconfiguration, or garbage in your /.htaccess. In .htaccess, do you see a line for "DirectoryIndex"? Does it omit index.php? It should give the entire list of "index" files to look for if only the directory name is given. Usually it's something like DirectoryIndex index.html index.htm index.php If that's not the case, maybe there's a bad or damaged URL rewrite in your .htaccess. Link to comment Share on other sites More sharing options...
dallasbird Posted April 9, 2015 Author Share Posted April 9, 2015 Hello Phil, Yes I tried your suggestion. Jack had same conclusion: Jack had me remove the contribution to the root .htaccess file and add / to Rewrite/oscommerce so it reads Rewrite/oscommerce/ in sub-directory index. Then he had me add DirectoryIndex index.php to the top of my root .htaccess - but I see he said shop .htaccess file, so I removed from public_html root and added to subdirectory .htaccess and sight seems faster, but still doesn't open to index.php here are files as they are now: root(public_html).htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^couplescorner\.biz$ [OR] RewriteCond %{HTTP_HOST} ^www\.couplescorner\.biz$ RewriteRule ^/?$ "http\:\/\/couplescorner\.biz\/oscommerce" [R=301,L] <Files 403.shtml> order allow,deny allow from all </Files> deny from 5.39.218.36 deny from 37.58.100.92 deny from 37.58.100.89 deny from 212.113.35.162 deny from 212.113.37.105 deny from 212.113.37.106 deny from 212.186.119.134 deny from 213.186.120.196 deny from 213.186.122.2 deny from 213.186.122.3 deny from 213.186.127.3 deny from 173.199.115.115 deny from 5.10.83.70 deny from 37.58.100.176 deny from 37.58.100.235 deny from 37.58.100.177 deny from 37.58.100.237 deny from 37.58.100.167 deny from 37.58.100.74 deny from 37.58.100.82 deny from 146.148.60.191 RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [OR] RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR] RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR] RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR] RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR] RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR] RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR] RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR] RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR] RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR] RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR] RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR] RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR] RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR] RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR] RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR] RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus RewriteRule ^.* - [F,L] deny from 213.186.96.0/19 deny from 88.102.161.166 deny from 41.222.179.185 deny from 59.167.207.171 deny from 195.234.136.80 deny from 212.215.171.12 deny from 192.95.30.173 and subdirectory: oscommerce/.htaccess: DirectoryIndex index.php # $Id$ # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> # <IfDefine SSL> # SetEnvIf User-Agent ".*MSIE.*" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 # </IfDefine> #</IfModule> # If Search Engine Friendly URLs do not work, try enabling the # following Apache configuration parameter # AcceptPathInfo On # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) # php_value session.use_trans_sid 0 # php_value register_globals 1 <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl|jpg|png|gif)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> # BEGIN Expire headers ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 604800 seconds" ExpiresByType application/javascript "access plus 604800 seconds" ExpiresByType text/html "access plus 2592000 seconds" # END Expire headers # Begin Ultimate SEO Options +FollowSymLinks Options -MultiViews RewriteEngine on # RewriteBase instructions # Change RewriteBase dependent on how your shop is accessed as below. # http://www.mysite.com= RewriteBase / # http://www.mysite.com/catalog/= RewriteBase /catalog/ # http://www.mysite.com/catalog/shop/= RewriteBase /catalog/shop/ # Change the following line using the instructions above RewriteBase /oscommerce/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING} # End Ultimate SEO Phil - I would appreciate any help I can get. Ultimately my sight has been slowing down as soon as you start scrolling through categories, so I am trying to clear up all errors and reduce queries, but first I need to get this taken care of. I did get the 34< off my site, the grep really worked!! I added all the deny's awhile ago because I was trying to reduce rogue traffic that could have been slowing down my site, but obviously it is more than that, and I must have problems with my code somewhere. Thank you for your time and help. Jenny Link to comment Share on other sites More sharing options...
MrPhil Posted April 9, 2015 Share Posted April 9, 2015 OK, so you have osC installed under /oscommerce/. Correct? That's good -- you want to put a major application in its own directory tree so it doesn't collide with anything else on your site, now or due to future additions (a blog, forum, gallery, etc.). The first step in /.htaccess (root) is to direct visitors to the root, over to the store (until such time as you build a landing page in the root with links to the store and to other applications on your site). You want to decide at this point whether to let visitors see "/oscommerce" in the path. I would have named it "/shop" or something like that, which hides your technology used and would allow a store change in the future, but that may be water under the bridge at this point (especially if search engines have indexed your site, and customers have bookmarked it). Let's say you do want to expose "/oscommerce" to visitors (a reasonable thing to do) and your configure.php is set up to generate links showing "/oscommerce" anyway. Note that you only want to rewrite the URI if the incoming link does NOT already include /oscommerce (possibly that is part of your problem!): RewriteCond %{HTTP_HOST} ^couplescorner\.biz$ [OR] RewriteCond %{HTTP_HOST} ^www\.couplescorner\.biz$ RewriteRule ^/?$ "http\:\/\/couplescorner\.biz\/oscommerce" [R=301,L] should be RewriteCond %{HTTP_HOST} ^(www\.)?couplescorner\.biz$ RewriteCond %{REQUEST_URI} !^/oscommerce RewriteRule ^(.*)$ http://couplescorner.biz/oscommerce/$1 [R=301,L] See if that helps with the index.php problem, too. The R=301 tells search engines to index only /oscommerce, and not the / they may have actually come in on. Visitors will also see /oscommerce in the URI. There are ways to hide all this stuff, so visitors and search engines only see /. Note that if you ever add other applications on your site, that having /oscommerce will mean that indexes and bookmarks are still good. Next, I must say I'm confused by your references to "Rewrite/oscommerce/". What exactly do you mean? Unless you actually have a directory named "Rewrite", you should not have such a string anywhere in your .htaccess files. The DirectoryIndex command, if you need to add it, should be in the root (/.htaccess). Remember that the root /.htaccess will be completely processed, and then /oscommerce/.htaccess (if your visitor goes to that directory) will be processed, overriding anything set in the root /.htaccess. I see you have just DirectoryIndex index.php Note that it will not look for index.html or index.htm, should you have those files, but only for index.php (should the visitor only give the directory). That may be adequate for osC, but you should understand what you are doing with that command. If you are putting the visitor into /oscommerce/ via .htaccess, I'm not sure you want to set RewriteBase to /oscommerce. Try setting it back to /, or even commenting out (#) that command, if it's still not working. Finally, note that an increasing number of hosts no longer permit the Options commands. Are you getting any errors (probably 500 Internal Server Error) logged? Link to comment Share on other sites More sharing options...
dallasbird Posted April 9, 2015 Author Share Posted April 9, 2015 Hello again Phil, I am trying out : RewriteCond %{HTTP_HOST} ^(www\.)?couplescorner\.biz$RewriteCond %{REQUEST_URI} !^/oscommerceRewriteRule ^(.*)$ http://couplescorner.biz/oscommerce/$1 [R=301,L] DirectoryIndex index.php in root still not opening to index.php I started this site several years ago, and I wish I hadn't put oscommerce there, but I do have a lot of links out their pointing to my store that I don't want to break. I think it looks amateurish but is there a way of hiding it without breaking all the links? here is my incl/configure.php: <?php define('HTTP_SERVER', 'http://xxxx.biz'); define('HTTPS_SERVER', 'https://xxxx.biz'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'xxxx.biz'); define('HTTPS_COOKIE_DOMAIN', 'xxxx.biz'); define('HTTP_COOKIE_PATH', '/oscommerce/'); define('HTTPS_COOKIE_PATH', '/oscommerce/'); define('DIR_WS_HTTP_CATALOG', '/oscommerce/'); define('DIR_WS_HTTPS_CATALOG', '/oscommerce/'); 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/xxxxxxxxxxxx/public_html/oscommerce/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xxx.xxx.xxx.xxx'); define('DB_SERVER_USERNAME', 'xxxxxxx'); define('DB_SERVER_PASSWORD', 'XXXXXX'); define('DB_DATABASE', 'XXXXXX'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); // Width and height of the main product_info.php image define ( 'KISSIT_MAIN_PRODUCT_IMAGE_WIDTH', 300 ); define ( 'KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT', 200 ); define('DIR_WS_CACHE', DIR_WS_INCLUDES . 'cache/'); The Rewrite oscommerce/ is for SEO URLs as part of their instructions. It is what is causing the errors I am trying to get rid of. - I only have a index.php - I do not have any other index files and what do you mean about? "Finally, note that an increasing number of hosts no longer permit the Options commands. Are you getting any errors (probably 500 Internal Server Error) logged?" I haven't gotten any 500 internal service error lately, I get tep stop - on the page and these errors: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/xxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 114Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/oscommerce/includes/classes/seo.class.php:114) in /home/xxxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 2890Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/oscommerce/includes/classes/seo.class.php:114) in /home/xxxxxxx/public_html/oscommerce/includes/classes/seo.class.php on line 2892 To be honest I don't know how my oscommerce/.htaccess file should look - this was existing, or I did it in another time, but I am sure I don't know what I am doing. This file is pretty confusing to me. Link to comment Share on other sites More sharing options...
MrPhil Posted April 10, 2015 Share Posted April 10, 2015 OK, so "Rewrite/oscommerce" was just a typo on your part -- it's just referring to the .htaccess changes you added? The DirectoryIndex command you have shouldn't hurt osCommerce, which uses index.php, but if you add any index.html or index.htm pages elsewhere, don't forget to update it. Those 3 errors -- are they new, or have you just not mentioned them before? The second two errors (cannot modify header information) are a consequence of the first. Can you show lines 100 through 115 of seo.class.php? We might need more lines before to diagnose the problem. If you have a lot of links out there (as well as good Google position and lots of customer bookmarks), you might as well leave the structure of your site the same, and not try to make it look "better". That would risk breaking a lot of things. In addition to the Rewrite to /oscommerce/ that I suggested, did you also try changing RewriteBase /oscommerce/ to RewriteBase /? Link to comment Share on other sites More sharing options...
dallasbird Posted April 10, 2015 Author Share Posted April 10, 2015 Hello Phil, yesterday I started to remove 'credit class vochers and coupons' because it was getting an error and I didn't use it anyway and I must have done somehting stupid because now I can't get into my admin - i get this error: Too many redirects occurred trying to open “http://couplescorner.biz/oscommerce/404.shtml”.This might occur if you open a page that is redirected to open another page which then is redirected to open the original page. l or could this be a .htaccess error? I am going to go through the files and figure out what I did wrong. I'll get back to you asap - I just heard I had a terrible tragedy in my family, so please don't think I have given up on any of this, I just might be distracted a bit - working on there errors will probably be a real relief. Link to comment Share on other sites More sharing options...
MrPhil Posted April 10, 2015 Share Posted April 10, 2015 It's most likely a bad .htaccess file. Why don't you list both of them here (trim down the deny and agent lists to save space). Link to comment Share on other sites More sharing options...
dallasbird Posted April 10, 2015 Author Share Posted April 10, 2015 Thanks Phil, here is my root .htaccess - could it be that I have DirectoryIndex in both files?(highlighted in blue) RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?couplescorner\.biz$ RewriteCond %{REQUEST_URI} !^/oscommerce RewriteRule ^(.*)$ http://couplescorner.biz/oscommerce/$1[R=301,L] DirectoryIndex index.php and here is my oscommerce/.htaccess: DirectoryIndex index.php # $Id$ # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> # <IfDefine SSL> # SetEnvIf User-Agent ".*MSIE.*" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 # </IfDefine> #</IfModule> # If Search Engine Friendly URLs do not work, try enabling the # following Apache configuration parameter # AcceptPathInfo On # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) # php_value session.use_trans_sid 0 # php_value register_globals 1 <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl|jpg|png|gif)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> # BEGIN Expire headers ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 604800 seconds" ExpiresByType application/javascript "access plus 604800 seconds" ExpiresByType text/html "access plus 2592000 seconds" # END Expire headers # Begin Ultimate SEO Options +FollowSymLinks Options -MultiViews RewriteEngine on # RewriteBase instructions # Change RewriteBase dependent on how your shop is accessed as below. # http://www.mysite.com= RewriteBase / # http://www.mysite.com/catalog/= RewriteBase /catalog/ # http://www.mysite.com/catalog/shop/= RewriteBase /catalog/shop/ # Change the following line using the instructions above RewriteBase /oscommerce/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING} # End Ultimate SEO Link to comment Share on other sites More sharing options...
MrPhil Posted April 12, 2015 Share Posted April 12, 2015 If you have DirectoryIndex in the root .htaccess, you can take it out of the oscommerce/ .htaccess. Remember, the root .htaccess is always processed first, and then down the chain of other .htaccess files down to (and including) the directory you're running in. In your root .htaccess, make sure you have a blank (space) between the $1 and the [R=301. Those lines will rewrite the URL to put the visitor in /oscommerce, if they're not already there. Also note that by using R=301, you are telling search engines that /oscommerce is the correct directory to index, not the root. If you started to get errors when you tried removing an add-on, that usually means that you botched the job. I trust that you have a backup of your files that you can roll back to? If not, at this point if your store is all messed up, the easiest course of action might be to start over and reinstall it. If you have real data in your database, hopefully you can salvage that. I don't see anything obviously wrong with either .htaccess file, although you do have some items in there (such as Options) that will generate an error on some hosts. You can try commenting out (with #'s) one section at a time, and see if you can discover the cause of your errors. Don't forget to try changing the RewriteBase to / (or just # it out). I'm sorry to hear about your family's problems. I don't want to sound callous, but you really shouldn't try working on a site while your mind is elsewhere... you will make lots of dumb mistakes. At most, try to roll back the site to something that was partially working, and leave it at that until your head is clear. Link to comment Share on other sites More sharing options...
dallasbird Posted May 12, 2015 Author Share Posted May 12, 2015 Hello again Phil, You were not being callous - fortunately I had a back up of my sight so I was able to fix all the errors. I was totally unable to think clearly as one of my family members was killed in a car accident. I am finally back and able to look into diagnosing some problems. After much trouble with the .httacess file I am going to leave as is for now, but I have been researching the undefined index problem like this: there are a lot of different ones. I have been seaching the web for answers and this is what has been recommended: Error: Undefined index: path File: includes/classes/seo.class.php Line: 2593 there are a lot of different ones. I have been seaching the web for answers and this is what has been recommended: For example - this notice: Notice: Undefined index: message in /xxx/xxx/www/wp-content/plugins/adrotate/adrotate.php on line 134 All you need to do to fix it is change this line: $message = $_GET['message'];to this:$message = isset($_GET['message']) ? $_GET['message'] : ''; do you know anthing about this. The above fix was from a wordpress forum, I can't find this issue in oscommerce forum. Thanks J Link to comment Share on other sites More sharing options...
MrPhil Posted May 12, 2015 Share Posted May 12, 2015 I'm concerned that you are seeing "lots" of these undefined indexes. Unless the SEO add-on was very poorly written, it would be unusual to see any of these errors. I'm wondering if somehow you are getting to the correct PHP files, but without the URL Query String having been set up correctly by .htaccess. The WP fix would be similar for osC: any place you make use of a Query String setting, you would need to use the isset() call to check that the element in the $HTTP_GET_VARS array (or sometimes, the equivalent $_GET array) is set before trying to use it. The code should appropriately handle the case where such a Query String setting was not given, and not just avoid the "Undefined index" error. That you are seeing so many suggests to me that something has gone wrong "further up the food chain" and that trying to add patches is just applying Band-Aids to major wounds. Have you updated by hand to 2.3.4 (patching files from an older version), or did you end up installing a proper 2.3.4 and then tried to fit in your desired add-ons? If you took the first course of action, I suspect you overlooked something serious (missed some critical changes). Link to comment Share on other sites More sharing options...
dallasbird Posted May 14, 2015 Author Share Posted May 14, 2015 Hello Phil, I updated from earlier version 2.3.1. Lately I have been trying to replace all files with 2.3.4 files. I like the idea of replacing the entire oscommerce suite with the 2.3.4 new instal and then reinstalling my add ons. I have ultimate header tags seo and seo urls as well as wish list and xsell - i could just reinstall all these and they should work with old database. I have not been able to see how many queries counts on the kisser error handler I was wondering if this was because I wasn't using their headertags add on - do you know anything about this. I would be up for doing a clean instal of the 2.3.4 package - it would probably cause me less grief in the long run that trying to diagnose these errors Do you have any thoughts? Thanks, I appreciate your help. Jen Link to comment Share on other sites More sharing options...
dallasbird Posted May 14, 2015 Author Share Posted May 14, 2015 Phil, If I were to instal the 'proper' 2.3.4 is there a way to do it on the terminal through github or something. I really enjoy using it whenever I can. I will of course have my site backed up incase all goes wrong. I would want to instal an error handler first thing and then watch as i load each add on to make sure i don't have errors. Do you recommend any particular add ons Thanks again j Link to comment Share on other sites More sharing options...
MrPhil Posted May 14, 2015 Share Posted May 14, 2015 You're asking for a lot of trouble if you try replacing file-by-file. If you're starting from a good 2.3.1 base, it is possible to upgrade to 2.3.2, then 2.3.3, 2.3.3.1, 2.3.3.2, 2.3.3.3, 2.3.3.4, and finally 2.3.4. Or, you can install a fresh 2.3.4 and migrate your data (database upgrades and image files).Neither way would involve github. I can't recommend any particular add-on -- it will depend on what function you need for your site (and what you've been running with) and what's available for your version. If you choose the path of upgrading step-by-step, you may be able to preserve your existing add-ons, but I can't guarantee that all the updates will apply successfully to a non-vanilla system. Link to comment Share on other sites More sharing options...
dallasbird Posted May 14, 2015 Author Share Posted May 14, 2015 phil, i did all the upgrades one by one a year ago. I do think I must be having complications with old code. Thanks for your help. I am going to try the new version and see if that helps me. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.