Magento showing wrong customer ipCustomer account dashboard showing orders from wrong customerMagento...

Pure Functions: Does "No Side Effects" Imply "Always Same Output, Given Same Input"?

Non-Italian European mafias in USA?

Dystopian novel where telepathic humans live under a dome

Why are special aircraft used for the carriers in the United States Navy?

Six real numbers so that product of any five is the sixth one

Did Amazon pay $0 in taxes last year?

Is there a full canon version of Tyrion's jackass/honeycomb joke?

Practical reasons to have both a large police force and bounty hunting network?

How can atoms be electrically neutral when there is a difference in the positions of the charges?

How to kill a localhost:8080

How to lift/raise/repair a segment of concrete slab?

Where is the fallacy here?

What type of investment is best suited for a 1-year investment on a down payment?

At what level can a party fight a mimic?

What should the omniscient narrator call a character?

Borrowing Characters

Can we carry rice to Japan?

How to mitigate "bandwagon attacking" from players?

What happened to QGIS 2.x LTR?

Is there a math equivalent to the conditional ternary operator?

Misplaced tyre lever - alternatives?

Citing contemporaneous (interlaced?) preprints

What are all the squawk codes?

Canadian citizen, on US no-fly list. What can I do in order to be allowed on flights which go through US airspace?



Magento showing wrong customer ip


Customer account dashboard showing orders from wrong customerMagento programatically convert quote to order - orders missing in backendMagento order email sending to wrong customer..?Wrong Customer Account Creation dateMagento sending emails to wrong customerMagento filtering showing wrong countCertain Magento Pages returning HTTP Error 500Magento : Admin Magento Connect Manager is Showing Wrong VersionWrong customer account after loginCreating Order Programatically Showing Wrong Grand Total













0















I have a US based website when customer placed order, in their order "Placed from IP" showing my ip in each order also, I have few custom module for tracking order and user activity in these modules ip is showing mine. it's strange.I am not found the issue.Also when i'm printing ip from root folder then it's working fine.



My module code :



function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];

if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}


But my concern is Magento default sales/order code should be run fine.










share|improve this question
















bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • what code are you using to get client ip?

    – Bilal Usean
    Jan 23 '17 at 6:02











  • In sales order mageto's default code working

    – Kanika
    Jan 23 '17 at 6:21
















0















I have a US based website when customer placed order, in their order "Placed from IP" showing my ip in each order also, I have few custom module for tracking order and user activity in these modules ip is showing mine. it's strange.I am not found the issue.Also when i'm printing ip from root folder then it's working fine.



My module code :



function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];

if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}


But my concern is Magento default sales/order code should be run fine.










share|improve this question
















bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • what code are you using to get client ip?

    – Bilal Usean
    Jan 23 '17 at 6:02











  • In sales order mageto's default code working

    – Kanika
    Jan 23 '17 at 6:21














0












0








0








I have a US based website when customer placed order, in their order "Placed from IP" showing my ip in each order also, I have few custom module for tracking order and user activity in these modules ip is showing mine. it's strange.I am not found the issue.Also when i'm printing ip from root folder then it's working fine.



My module code :



function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];

if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}


But my concern is Magento default sales/order code should be run fine.










share|improve this question
















I have a US based website when customer placed order, in their order "Placed from IP" showing my ip in each order also, I have few custom module for tracking order and user activity in these modules ip is showing mine. it's strange.I am not found the issue.Also when i'm printing ip from root folder then it's working fine.



My module code :



function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];

if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}


But my concern is Magento default sales/order code should be run fine.







magento-1.9






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 23 '17 at 6:23







Kanika

















asked Jan 23 '17 at 6:00









KanikaKanika

949




949





bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • what code are you using to get client ip?

    – Bilal Usean
    Jan 23 '17 at 6:02











  • In sales order mageto's default code working

    – Kanika
    Jan 23 '17 at 6:21



















  • what code are you using to get client ip?

    – Bilal Usean
    Jan 23 '17 at 6:02











  • In sales order mageto's default code working

    – Kanika
    Jan 23 '17 at 6:21

















what code are you using to get client ip?

– Bilal Usean
Jan 23 '17 at 6:02





what code are you using to get client ip?

– Bilal Usean
Jan 23 '17 at 6:02













In sales order mageto's default code working

– Kanika
Jan 23 '17 at 6:21





In sales order mageto's default code working

– Kanika
Jan 23 '17 at 6:21










2 Answers
2






active

oldest

votes


















0














Please refer the below link.Best of Luck...



https://go.eway.io/s/article/Magento-is-using-the-wrong-customer-IP-address






share|improve this answer































    0














    I have fixed the above my issue.



    There was a code placed in index.php



    if($_SERVER['REMOTE_ADDR'] = '202.164.34.112'){
    Mage::setIsDeveloperMode(true);
    ini_set('display_errors', 1);
    }


    I have commented this piece of code and all the thing are working fine now.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "479"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f155918%2fmagento-showing-wrong-customer-ip%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Please refer the below link.Best of Luck...



      https://go.eway.io/s/article/Magento-is-using-the-wrong-customer-IP-address






      share|improve this answer




























        0














        Please refer the below link.Best of Luck...



        https://go.eway.io/s/article/Magento-is-using-the-wrong-customer-IP-address






        share|improve this answer


























          0












          0








          0







          Please refer the below link.Best of Luck...



          https://go.eway.io/s/article/Magento-is-using-the-wrong-customer-IP-address






          share|improve this answer













          Please refer the below link.Best of Luck...



          https://go.eway.io/s/article/Magento-is-using-the-wrong-customer-IP-address







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 23 '17 at 7:21









          JayeshJayesh

          1012




          1012

























              0














              I have fixed the above my issue.



              There was a code placed in index.php



              if($_SERVER['REMOTE_ADDR'] = '202.164.34.112'){
              Mage::setIsDeveloperMode(true);
              ini_set('display_errors', 1);
              }


              I have commented this piece of code and all the thing are working fine now.






              share|improve this answer




























                0














                I have fixed the above my issue.



                There was a code placed in index.php



                if($_SERVER['REMOTE_ADDR'] = '202.164.34.112'){
                Mage::setIsDeveloperMode(true);
                ini_set('display_errors', 1);
                }


                I have commented this piece of code and all the thing are working fine now.






                share|improve this answer


























                  0












                  0








                  0







                  I have fixed the above my issue.



                  There was a code placed in index.php



                  if($_SERVER['REMOTE_ADDR'] = '202.164.34.112'){
                  Mage::setIsDeveloperMode(true);
                  ini_set('display_errors', 1);
                  }


                  I have commented this piece of code and all the thing are working fine now.






                  share|improve this answer













                  I have fixed the above my issue.



                  There was a code placed in index.php



                  if($_SERVER['REMOTE_ADDR'] = '202.164.34.112'){
                  Mage::setIsDeveloperMode(true);
                  ini_set('display_errors', 1);
                  }


                  I have commented this piece of code and all the thing are working fine now.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 23 '17 at 7:23









                  KanikaKanika

                  949




                  949






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f155918%2fmagento-showing-wrong-customer-ip%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                      How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                      變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...