On Thu, May 18, 2006 2:22 pm, Marcus Bointon wrote:
> I'm running PHP 5.1.4 on OS X. When I look at $_SERVER
> ['REMOTE_ADDR'], it seems to contain an ipv6 address rather than an
> ipv4 one (at present it's giving me 'fe80::1' instead of the usual
> dotted quad), and that confuses the hell out of things like MySQL's
> INET_ATON() function. I have ipv6 networking disabled in my network
> control panel, and my PHP is configured with --disable-ipv6. How can
> I force it to return only ipv4 addresses? Is there an ini setting
> somewhere?

Assuming for the sake of argument that your visitor is on an IPv6
machine somewhere, would you want $_SERVER['REMOTE_ADDR'] to be not
set at all, or NULL or ???

For now, at least, you should filter the input and discard ipv6 data.

For that matter, you probably ought to be filtering that input anyway,
just in case, for better security and sql-injections, no?

Hard to see how somebody could push something through that variable to
do an sql-injection attack, but there it is.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to