Page 8 of 11 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 102
  1. #71
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Credit Card Fraud Detection (MaxMind)

    Here is the error message, it's just a generic "catch-all" 500 error.

    "HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."

    I will contact my host to get more details on the error.

    The Fast and Easy Checkout module that I'm referring to is this: https://www.numinix.com/fast-and-eas...cd4714de3a168d

    And finally, here is a copy of the order.php modified core with the maxmind code merged in. As you can see, I've tried both lines of code where it submits 6 vs 4 digits to maxmind (by commenting one of them out) and either way results in the internal 500 error. http://www.robophung.net/zencart/order.php.bak

    And you can also see, that the order.php is drastically different than the original order.php for zc 1.3.9h... but I think I merged your code into the appropriate spots.

    Thanks for responding, and I hope u can steer me in the right direction...

  2. #72
    Join Date
    Dec 2003
    Location
    Astoria, Or
    Posts
    455
    Plugin Contributions
    2

    Default Re: Credit Card Fraud Detection (MaxMind)

    Quote Originally Posted by RoboPhung View Post
    Here is the error message, it's just a generic "catch-all" 500 error.

    "HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."

    I will contact my host to get more details on the error.

    The Fast and Easy Checkout module that I'm referring to is this: https://www.numinix.com/fast-and-eas...cd4714de3a168d

    And finally, here is a copy of the order.php modified core with the maxmind code merged in. As you can see, I've tried both lines of code where it submits 6 vs 4 digits to maxmind (by commenting one of them out) and either way results in the internal 500 error. http://www.robophung.net/zencart/order.php.bak

    And you can also see, that the order.php is drastically different than the original order.php for zc 1.3.9h... but I think I merged your code into the appropriate spots.

    Thanks for responding, and I hope u can steer me in the right direction...
    500 doesn't help
    Try running the defaultZC order.php, then try the MaxMind order.php ... does either one allow checkout? What made you point your finger at that file? The changes to that page are very minor.

  3. #73
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Credit Card Fraud Detection (MaxMind)

    So like a previous poster said, using the original order.php does not seem to affect the function of this module in any way. I decided to use the original order.php and now this mod seems to be working great!

    My understanding of code is pretty limited, but like the other poster mentioned, I am not sure why this code is necessary?

    $_SERVER['REMOTE_ADDR'] = $server_remote_addr;
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $server_remote_addr; }

    ....

    'ip_address' => $_SESSION['customers_ip_address'] . $server_remote_address

    This conditional statement and reassignment of the 'ip_address' field in the array appears to lead to the same outcome as the original unmodified order.php. The only thing I can see these lines of code adding is to make sure that $_SERVER['REMOTE_ADDR'] does not return a null value before assigning it to the $server_remote_address variable...

    Also, after sitting down and looking at this code and trying to understand it, it actually seems like there really is no reason why a simple extra conditional check would cause an internal server issue...

    The only thing I can think of (and I think also seems to make sense given the structure of the conditional statement) is that the code should actually read like...

    $server_remote_addr = $_SERVER['REMOTE_ADDR'];
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $server_remote_addr; }

    Because isn't $server_remote_addr an undefined value that you are assigning the customer's IP by calling the $_SERVER['REMOTE_ADDR'] function?? And then using the newly defined $server_remote_addr in the conditional statement?

    It doesn't seem to make sense to have it as... $_SERVER['REMOTE_ADDR'] = $server_remote_addr;

    Because $_SERVER['REMOTE_ADDR'] isn't a variable, it's a function call, and having the code this way leaves $server_remote_addr with a null value...

    Sorry, my understanding of php is limited, but this is how I see it... any clarification you can offer would be immensely helpful, thanks SES!!!

  4. #74
    Join Date
    Dec 2003
    Location
    Astoria, Or
    Posts
    455
    Plugin Contributions
    2

    Default Re: Credit Card Fraud Detection (MaxMind)

    Quote Originally Posted by RoboPhung View Post
    So like a previous poster said, using the original order.php does not seem to affect the function of this module in any way. I decided to use the original order.php and now this mod seems to be working great!

    My understanding of code is pretty limited, but like the other poster mentioned, I am not sure why this code is necessary?

    $_SERVER['REMOTE_ADDR'] = $server_remote_addr;
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $server_remote_addr; }

    ....

    'ip_address' => $_SESSION['customers_ip_address'] . $server_remote_address

    This conditional statement and reassignment of the 'ip_address' field in the array appears to lead to the same outcome as the original unmodified order.php. The only thing I can see these lines of code adding is to make sure that $_SERVER['REMOTE_ADDR'] does not return a null value before assigning it to the $server_remote_address variable...

    Also, after sitting down and looking at this code and trying to understand it, it actually seems like there really is no reason why a simple extra conditional check would cause an internal server issue...

    The only thing I can think of (and I think also seems to make sense given the structure of the conditional statement) is that the code should actually read like...

    $server_remote_addr = $_SERVER['REMOTE_ADDR'];
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $server_remote_addr; }

    Because isn't $server_remote_addr an undefined value that you are assigning the customer's IP by calling the $_SERVER['REMOTE_ADDR'] function?? And then using the newly defined $server_remote_addr in the conditional statement?

    It doesn't seem to make sense to have it as... $_SERVER['REMOTE_ADDR'] = $server_remote_addr;

    Because $_SERVER['REMOTE_ADDR'] isn't a variable, it's a function call, and having the code this way leaves $server_remote_addr with a null value...

    Sorry, my understanding of php is limited, but this is how I see it... any clarification you can offer would be immensely helpful, thanks SES!!!
    You are correct that it is written backwards, however if a variable equals a variable, then it's equal, PHP is smart! That was written to deal with an issue where Ajay modified the IP address field and it was returning an x-forwarded ip, so if a customer went to paypal then returned to complete the transaction it was recording paypals ip and not the customers. I'm not in front of a development workstation to go over in detail the changes and why it was written the way that it is. That code was developed more than five years ago! I'll be getting it ready for a 1.5 update shortly and I'll re-visit the order.php page. I should be able to just write an override to deal with the problem and not be touching core files.

  5. #75
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Credit Card Fraud Detection (MaxMind)

    Ahh okay! Thanks for the explanation! But I still can't understand why a small conditional statement like that would cause a 500 error...since you are absolutely right and the changes to order.php are very minimal (and apparently not totally necessary to get this module working). But yes, I did revert back to my original order.php (the original modified version included with the Fast and Easy checkout module) and it is completely working... The only last thing I can think of is that I'm on PHP 5.3, and that conditional statement only works with PHP 5.2??

    Either way, it works and I'm glad. Thanks again for your help and attention SES, and for this great mod!

  6. #76
    Join Date
    Dec 2003
    Location
    Astoria, Or
    Posts
    455
    Plugin Contributions
    2

    Default Re: Credit Card Fraud Detection (MaxMind)

    Quote Originally Posted by RoboPhung View Post
    Ahh okay! Thanks for the explanation! But I still can't understand why a small conditional statement like that would cause a 500 error...since you are absolutely right and the changes to order.php are very minimal (and apparently not totally necessary to get this module working). But yes, I did revert back to my original order.php (the original modified version included with the Fast and Easy checkout module) and it is completely working... The only last thing I can think of is that I'm on PHP 5.3, and that conditional statement only works with PHP 5.2??

    Either way, it works and I'm glad. Thanks again for your help and attention SES, and for this great mod!
    Out of curiosity, if you flip
    Code:
    $_SERVER['REMOTE_ADDR'] = $server_remote_addr;
    do you still get a 500? Would be nice to know if that is all that was causing the error.

  7. #77
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Credit Card Fraud Detection (MaxMind)

    Already tried that...LOL

    Still got the 500. I'll contact my host and have them send me logs of the error to really get to the bottom of it.

  8. #78
    Join Date
    Dec 2003
    Location
    Astoria, Or
    Posts
    455
    Plugin Contributions
    2

    Default Re: Credit Card Fraud Detection (MaxMind)

    Quote Originally Posted by RoboPhung View Post
    Already tried that...LOL

    Still got the 500. I'll contact my host and have them send me logs of the error to really get to the bottom of it.
    Too weird, perhaps that var is not able to be called? Try this in a blank doc:
    Code:
    <?php echo $_SERVER['REMOTE_ADDR']; ?>
    The only other options are:
    Code:
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $server_remote_addr; }
    to
    Code:
    if (zen_not_null($server_remote_addr)) { $server_remote_address = ' - ' . $_SERVER['REMOTE_ADDR']; }
    or
    Code:
    $server_remote_address = ' - ' . $server_remote_addr;
    or
    Code:
    $server_remote_address = ' - ' . $_SERVER['REMOTE_ADDR'];

  9. #79
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Credit Card Fraud Detection (MaxMind)

    yeah i got my ip displayed from an empty php doc with that line of code, <?php echo $_SERVER['REMOTE_ADDR']; ?>

    ..yeah I'll try to mess with it some more and get back to you if I find out what's causing the 500.

  10. #80
    Join Date
    Dec 2003
    Location
    Astoria, Or
    Posts
    455
    Plugin Contributions
    2

    Default Re: Credit Card Fraud Detection (MaxMind)

    Quote Originally Posted by RoboPhung View Post
    yeah i got my ip displayed from an empty php doc with that line of code, <?php echo $_SERVER['REMOTE_ADDR']; ?>

    ..yeah I'll try to mess with it some more and get back to you if I find out what's causing the 500.
    Did you ever get a copy of the log report?

 

 
Page 8 of 11 FirstFirst ... 678910 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR