| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Logging IP numbers | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#61
|
|||||||
|
|||||||
![]() Quote:
Good idea. :P Here it is. Follow the steps, and for those of you who already got it working, let me know if I missed anything. If you have Xcart 3.5.8+, change the following shown below in top.inc.php... Code:
Code:
Next, check your PHP server settings using a script containing <?php phpinfo(); ?> to determine if register_globals is on. If it is, and you cannot directly change it, add the the line php_value register_globals 0 to your root .htaccess file. This is done for security reasons. After you have completed the above, create a file named fetch_remote_address.php in the Xcart include/ directory. Add the following to that file: Code:
Now open include/func.php, find the declaration for the function func_place_order(), and add the following directly below the lines containing global at the start of the function: Code:
In that same function in func.php, add Code:
Code:
Code:
Code:
Code:
Finally, use PHPMyAdmin or some similar MySQL database administration software, to add the field ip after the field email. The data type for the ip field should be varchar(12 ![]() There is the possibility that the customer could have a longer IP address list than will fit in a 128 character length field. However, if that is the case then they are probably hiding behind a range of proxies to obfuscate themselves, which points to possible fraud. You can increase the IP field data type to any length if you feel so inclined. Again, please let me know if I left any step out. I really hope this works this time! ![]()
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#62
|
|||||||||
|
|||||||||
![]() Adpboss,
Just FYI, I got this to work in 3.5.5 with Boomer's original post in the first page of this thread. So if you try getting it to work in something earlier than 3.5.8, you should be able to with Boomer's original post. This is knawing at me too. Maybe I'll install 3.5.9 tonight and work on it sooner than later. I'll let you guys know if I figure it out as I'll want to be using it when I upgrade to 3.5.9 anyway. I agree that it should be standard. ![]() Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#63
|
|||||||||
|
|||||||||
![]() 3.5.9
![]() I'll try NuAlpha's mod. Seems exotic but he's just crazy enough to make it work. Thanks for reposting NuAlpha. |
|||||||||
#64
|
|||||||
|
|||||||
![]() Quote:
![]()
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#65
|
|||||||||
|
|||||||||
![]() More than likely the global was stripped, although I can't find much to confirm it in the CHANGELOG, course this was probably meant to be left out since its a detourant to keep script kiddies away from injecting code segments into places they don't belong.
I beleive this was added in 3.5.8. Anyone confirm? If I get a chance I'll get 3.5.9 installed locally and generate a .diff patch for easier installation. Anyhow... |
|||||||||
#66
|
|||||||
|
|||||||
![]() Quote:
What program do you use for this?
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#67
|
|||||||
|
|||||||
![]() I really have to start keeping better records of my mods and my mods to other peoples mods, I have this working in 3.5.9 but I can't remember how I did it?
![]() |
|||||||
#68
|
|||||||||
|
|||||||||
![]() |
|||||||||
#69
|
|||||||
|
|||||||
![]() NuAlpha,
I've been struggling with this for some time and finally got it to work after following your instructions to the letter! Appreciate the help. FYI I'm pretty sure it was because I had register_globals set to "On". David
__________________
xcart v4.4.1 |
|||||||
#70
|
|||||||
|
|||||||
![]() Quote:
Hopefully you won't be the only one to get this working! ![]() I am stumped why IP logging for logins would be built into Xcart by default but not IP logging for orders. ![]() Which, by the way, if you want every form of IP address detected during login, open the file include/login.php and add: Code:
Code:
After that, do a find on db_query("REPLACE INTO within the same file. Replace every: Code:
Code:
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|