a question about REQUEST.REMOTE_ADDR ?
hi all: I made a guest book, and i wish to write down every guest's IP address . here is my code, but i keep getting IP address 127.0.0.1 , whY??? can any one help me with this ? thanks in advance. python script code : ------------------------------------------------------ parameters:guest_name, comments, REQUEST --------------------------------------------------- id='msg_%d' % len(context.objectIds()) comments = comments + "\n\n" + "IP 地址:"+ REQUEST.REMOTE_ADDR # create the document context.manage_addProduct['OFSP'].manage_addDTMLDocument(id,title="", file=comments) # add a guest_name string property doc=getattr(context, id) doc.manage_addProperty('guest_name', guest_name, 'string')
On Thu, Nov 01, 2001 at 09:57:29AM +0800, Eiffel wrote:
hi all: I made a guest book, and i wish to write down every guest's IP address .
Don't do this (privacy, security).
here is my code, but i keep getting IP address 127.0.0.1 , whY?
Probably because you hide your Zope behind Apache using mod_proxy? Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Thu, Nov 01, 2001 at 09:57:29AM +0800, Eiffel wrote:
I made a guest book, and i wish to write down every guest's IP address . here is my code, but i keep getting IP address 127.0.0.1 , whY??? can any one help me with this ? thanks in advance.
You've got Apache/squid/something else proxying to Zope on the same machine, right? You'll likely see the same thing in your Z2.log because Zope's not seeing any connections from the outside world, only through your proxy on 127.0.0.1 -- search the mail archives for references to possible Apache patches that pass through the client's IP. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
On Thu, 1 Nov 2001, Mike Renfro wrote:
On Thu, Nov 01, 2001 at 09:57:29AM +0800, Eiffel wrote:
I made a guest book, and i wish to write down every guest's IP address . here is my code, but i keep getting IP address 127.0.0.1 , whY??? can any one help me with this ? thanks in advance.
You've got Apache/squid/something else proxying to Zope on the same machine, right? You'll likely see the same thing in your Z2.log because Zope's not seeing any connections from the outside world, only through your proxy on 127.0.0.1 -- search the mail archives for references to possible Apache patches that pass through the client's IP.
You can also check out my How-To at http://www.zope.org/Members/TWilson/GettingVisitorsIP -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | <dtml-var pithy_quote> | http://linux.com
I made a guest book, and i wish to write down every guest's IP address .
here is my code, but i keep getting IP address 127.0.0.1 , whY??? can any one help me with this ? thanks in advance.
Any chance you are using apache as a front-end via mod_proxy?
participants (5)
-
Eiffel -
Mike Renfro -
Oleg Broytmann -
Steve Drees -
Timothy Wilson