Jump to content


Corporate Sponsors


Latest News: (loading..)

Debs

Member Since 18 Jun 2004
Offline Last Active Dec 20 2011, 06:43
-----

Posts I've Made

In Topic: getIPAddress() development

29 November 2011, 11:09

Perhaps this could be helpful to you. I have successfully used this for a script I made (to read geoip and direct or block traffic). It should catch proxy traffic etc. correctly. It has served me well for a couple years. I am not aware that it could be easily spoofed.

function getUserIP() {
$IP_seeker = '';
if (getenv('HTTP_CLIENT_IP')) {
$IP_seeker = getenv('HTTP_CLIENT_IP');
} elseif (getenv('HTTP_X_FORWARDED_FOR')) {
$IP_seeker = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_X_FORWARDED')) {
$IP_seeker = getenv('HTTP_X_FORWARDED');
} elseif (getenv('HTTP_FORWARDED_FOR')) {
$IP_seeker = getenv('HTTP_FORWARDED_FOR');
} elseif (getenv('HTTP_FORWARDED')) {
$IP_seeker = getenv('HTTP_FORWARDED');
} else {
$IP_seeker = $_SERVER['REMOTE_ADDR'];
}
return $IP_seeker;
}

In Topic: website down on thanksgiving weekend, help needed

28 November 2011, 01:26

Hi Anne,
It looks like your code is messed up. Perhaps a missing } in index.php (add just before line 296 for testing)

also, when viewing your page http://........com/specials.php
This notice was received: FATAL ERROR: register_globals is disabled in php.ini, please enable it!
If you really need it, try turning it back on or flag it on.
Also go to your admin >> Configuration, and reset your SEO URLs Cache
It looks like your database may be messed up some too...
Were you hacked?

In Topic: ULTIMATE Seo Urls 5 - by FWR Media

17 November 2011, 13:09

View Postkohalabill, on 02 November 2011, 19:40, said:

osCommerce apparently allows categories id's to be added to no end in the url. I have around 1,000 categories 3 levels deep and around 20,000 products. I've had page load times in excess of 5 minutes, which seem to be caused by the caching system (speeds increased after cache has been deleted). After more insight from problems every 3 months at the start, and more frequent as time went on I've came to notice an interesting trend. For some reason the web crawlers just start adding categories such as: 22_34_78_79_99 and so on! I now have around 90k pages indexed at Google, LOL. I'm going to have a lot of pages not found for quite awhile to come. As long as the last two are valid osCommerce category id's the site accepts the entry and displays the last category id.

Many of the cached entries had category depths as high as 5 levels deep or more?

This becomes a serious issue in USU5 because of the size of the cache (seek times in sqlite are enormous, file seek times are impossible, I never tried mysql caching), with google indexing around 90k pages and crawling an amazing amount of pages and continually adding random add-on categories. I was desperate and made a change to the tep_parse_category_path function in general.php, this fixed the caching problem from osCommerce's cache, but did nothing for the problem with caching in USU5. In order to stop USU5 from caching these invalid url's, I tried to modify the index.php in the page modules directory and couldn't figure out how. So instead I was able to modify the hrefLink function in usu5.php file in the main directory like this:
	public function hrefLink( $page, $parameters, $connection, $add_session_id, $search_engine_safe ) {
	 // Badly coded shops often pass in odd characters
	
	 if (sizeof($parameters)>2){
	  $parameters = array_slice ($parameters, -3);	
	  return osc_href_link( $page, $parameters, $connection, $add_session_id, $search_engine_safe );
	 }

I'm not sure if this is the most elegant way to fix this problem or if there is a better way!

-Bill

I had the same issue with manufacturers_id appended to the rewritten URL... not often, but some were showing up.
Perhaps my way is not the most elegant way either, but it will quickly remove them from being indexed and send the proper header to avoid duplicate content issues.

This was my fix to catch them; you can tweak my rewrite to fix your categories issue too.


RewriteCond %{THE_REQUEST} ^GET\ /.*\.html\?manufacturers_id=.*\ HTTP/
RewriteCond %{QUERY_STRING} !^$
RewriteRule .* http://yoursite.com%{REQUEST_URI}? [R=301,L]



Notice how it only addresses the rewritten (html) pages.
...index.php?manufacturers_id=
is required when viewing page 2, 3, 4 etc.

Perhaps this has already been addressed, but why doesn't this (Seo Urls 5) rewrite manufacturers pages on split page results?

Debs

In Topic: extremely high traffic

29 July 2011, 22:51

It wouldn't be the Yandex bot would it?

A misbehaved, hyper-aggressive Russian spider that ignores rules.
If left unchecked it can eat up to 5GB a day on some sites...

There are a few ways to block it... here's one that should work in your root htaccess file:

########## start block
SetEnvIfNoCase User-Agent "^Yandex*" bad_bot

<Limit GET POST>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>
########## end block

In Topic: One Page Checkout Support

28 July 2011, 22:07

View PostCrow123, on 14 July 2011, 04:39, said:

Interesting Debs,

I tried a bunch of what they were talking about, but really came away with a couple of thoughts.....

1..I have no idea what or how to deal with JQuerry, or infact any JavaScript
2..Maybe I should update the JQuerry.

So I grabbed the latest version of JQuerry called: jquery-ui-1.8.14.custom.min.js, changed the name to jQuery.ui.js and placed it into the ext folder, I also grabbed a copy of jQuery.js 1.6.2 and slammed that into my website, again into the ext folder.

Now I no longer get the Waiting for long running script error, I do, however, get the annoying Message from webpage "there was an error checking e-mail address, please inform......" pop up. So really no better off. In fact worse, as my Chrome no longer works, I get the same error as I do in IE9.

The fact that I changed the error I am getting indicates to me that I am on the right path, and need to get my JQuerry files sorted out, but to do that I need a better understanding of what they do. Anyone disagree/agree? I am sure I have created my own problems by using what I guessed at as the right script and would love someone to give me a clearer picture as to what we need for this script to work.

Steve C

Hey Steve,
Did you get this fixed? I came across a solution that worked for me and it had nothing to do with updating the jquery core file or jQuery.ui.js...

For me The issue was in /includes/checkout/checkout.js

View this site: http://www.oscommercesupport.net/labs/ezosc_stores/v3.4/ezosc-professional/ecommerce-solutions-c-26.html
add item to your cart and go to the checkout page.

Save this file:
http://www.oscommercesupport.net/labs/ezosc_stores/v3.4/ezosc-professional/includes/checkout/checkout.js

Try replacing your /includes/checkout/checkout.js with this modified one.

I'm not certain why it corrected the error but it appears the updated /includes/checkout/checkout.js fixes some issues.

Well it fixed the issue for me. Let me know if it worked for you too.


Should I have posted this "file/ fix"?

Well they are using the core open source checkout here that included hundreds of hours of open source coding... plus the source code was not scrambled/ obfuscated.

Anyways, see if it works for you too.