Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2019-05-01 10:11:39

zack
Member
Registered: 2019-05-01
Posts: 6

LHC widget showing wrong Country/IP

Hi,

I have just installed LHC on my website. It's great.

I am facing one issue is that, i have put Live Chat Widget on one of the page, When a visitor visits this page with widget for chat or to leave a message, LHS is showing my own server IP and country instead of Visitor's IP/Country both in Admin and in email (if visitor use 'leave a message'). Due to this, all visitors are showing same IP/country. I checked all configurations however not able to resolve this problem.

Can anyone please help.

Thanks in Advance,

Zack

Offline

#2 2019-05-01 14:14:09

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

Hi zack, welcome on the live helper chat forum!
Thank you for your message!

Are you using CloudFlare?


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#3 2019-05-01 14:25:21

zack
Member
Registered: 2019-05-01
Posts: 6

Re: LHC widget showing wrong Country/IP

PeopleInside wrote:

Hi zack, welcome on the live helper chat forum!
Thank you for your message!

Are you using CloudFlare?

Thanks !!  LHC is great script.

No, i am on Hostgator Shared Hosting. If you like i can send you details in private where i have installed it. Please advice.

Last edited by zack (2019-05-01 14:25:59)

Offline

#4 2019-05-01 16:02:13

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

There is a public page where the widget is?
Can you share the web address where the widget is?

I upgraded you to a Member.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#5 2019-05-02 10:33:34

zack
Member
Registered: 2019-05-01
Posts: 6

Re: LHC widget showing wrong Country/IP

PeopleInside wrote:

There is a public page where the widget is?
Can you share the web address where the widget is?

I upgraded you to a Member.

Thanks, yeah, widget page is public.., i put a test page for now.

Here is the link : http://evaluer.co.in/testchat.html

After cross checking and testing, i found that if i use Secure URL with HTTPS -  https://evaluer.co.in/testchat.html   then it picks server Ip address and based upon IP its same country for all visitors.

If i use URL without HTTPS - http://evaluer.co.in/testchat.html  then it works fine and picks Visitor's IP address and country.

I had SSL enabled on this site with force redirect to HTTPS, now i have removed forced redirect and got the problem.

I am not sure, why is it happening like this. May be you can help me with this. I want to use HTTPS on this website.

Please provide some help.

Thanks in advance.

Regards,
Zack

Offline

#6 2019-05-02 11:58:33

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

Hi Zack, how you redirect, force SSL?
I use live helper chat under SSL forced and i am not able to reproduce this issue.
Also the demo is under SSL https://livehelperchat.com/demo-12c.html


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#7 2019-05-02 12:00:27

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

You have also to check live helper chat settings, live help configuration (tab) , chat configuration, Misc


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#8 2019-05-02 12:09:30

zack
Member
Registered: 2019-05-01
Posts: 6

Re: LHC widget showing wrong Country/IP

PeopleInside wrote:

Hi Zack, how you redirect, force SSL?
I use live helper chat under SSL forced and i am not able to reproduce this issue.
Also the demo is under SSL https://livehelperchat.com/demo-12c.html

I am using .htaccess to redirect.

Offline

#9 2019-05-02 12:12:53

zack
Member
Registered: 2019-05-01
Posts: 6

Re: LHC widget showing wrong Country/IP

PeopleInside wrote:

You have also to check live helper chat settings, live help configuration (tab) , chat configuration, Misc

Ok, will check in these options and see if i can sort it out.

Thanks

Offline

#10 2019-05-02 14:00:01

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

It's correct so all should work.
Try maybe to ask also to your hosting if the issue persist.
Let me know how is going.

I don't see how live helper chat can be the problem.
What version of PHP are you using?

And... what version of live helper chat have you installed?

Last edited by PeopleInside (2019-05-02 14:00:28)


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#11 2019-05-02 14:34:09

zack
Member
Registered: 2019-05-01
Posts: 6

Re: LHC widget showing wrong Country/IP

Thanks for your suggestions, will follows these.

PHP version is 5.6 & using latest version of LHC

Regards,
Zack

Offline

#12 2019-05-02 14:36:07

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

If you can please try to use a more updated PHP version.
https://www.php.net/supported-versions.php


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#13 2020-12-14 13:10:23

malaka
Member
Registered: 2017-06-10
Posts: 20

Re: LHC widget showing wrong Country/IP

hi all,
I'm facing the same issue.
I'm using Cloudflare service for my website.
then users didn't see real IP of my server and server directly didn't see user IP.
so when a user using LHC, admin portal showing that Cloudflare reverses proxy IP (not a user's correct IP).
but if we can use $_SERVER["HTTP_CF_CONNECTING_IP"] this PHP parameter ,i think we can solve that problem.

But I don't know where the suitable code to edit this
Thank you all
big_smile

Offline

#14 2020-12-14 14:47:35

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

malaka, I cannot help with Cloudflare configuration. Sorry.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#15 2020-12-14 16:28:25

malaka
Member
Registered: 2017-06-10
Posts: 20

Re: LHC widget showing wrong Country/IP

PeopleInside wrote:

malaka, I cannot help with Cloudflare configuration. Sorry.

I just said Cloudflare proxying the web request.
but the user's real IP stored at "HTTP_CF_CONNECTING_IP" PHP server parameter.
so I just want to know which code is detecting user IP part.

Offline

#16 2020-12-14 19:12:40

malaka
Member
Registered: 2017-06-10
Posts: 20

Re: LHC widget showing wrong Country/IP

malaka wrote:
PeopleInside wrote:

malaka, I cannot help with Cloudflare configuration. Sorry.

I just said Cloudflare proxying the web request.
but the user's real IP stored at "HTTP_CF_CONNECTING_IP" PHP server parameter.
so I just want to know which code is detecting user IP part.

I think I found the solution.
I checked \lib\core\lhcore\lhipdetect.php file.and I realized I need to enable 'proxy_mode' => true on \settings\settings.ini.php file.
then LHC displaying correct IP of the user

and this link has this solution
https://doc.livehelperchat.com/docs/blo … -detect-ip

Thank you All  smile  smile  smile  smile  smile

Last edited by malaka (2020-12-14 19:16:11)

Offline

#17 2020-12-14 19:49:33

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: LHC widget showing wrong Country/IP

Great to know malaka, seems you have found the right guide in the doc big_smile
Thanks for updating the discussion.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

Board footer