Recent Topics

1 Sep 02, 2008 21:09    

Hi all.

I run b2evolution on lighttpd on my local install.

But, in lighttpd, REMOTE_ADDR returns a IPV6 IP.

A sample:


Array
(
    [PATH] => /sbin:/bin:/usr/sbin:/usr/bin
    [SHELL] => /bin/bash
    [USER] => root
    [PHP_FCGI_CHILDREN] => 16
    [PHP_FCGI_MAX_REQUESTS] => 10000
    [FCGI_ROLE] => RESPONDER
    [SERVER_SOFTWARE] => lighttpd/1.4.19
    [SERVER_NAME] => 172.16.9.151
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PORT] => 80
    [SERVER_ADDR] => ::ffff:172.16.9.151
    [REMOTE_PORT] => 47619
    [REMOTE_ADDR] => ::ffff:192.168.20.25
    [SCRIPT_NAME] => /server.php
    [PATH_INFO] => 
    [SCRIPT_FILENAME] => /var/www/server.php
    [DOCUMENT_ROOT] => /var/www/
    [REQUEST_URI] => /server.php
    [QUERY_STRING] => 
    [REQUEST_METHOD] => GET
    [REDIRECT_STATUS] => 200
    [SERVER_PROTOCOL] => HTTP/1.1
    [HTTP_HOST] => 172.16.9.151
    [HTTP_USER_AGENT] => Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
    [HTTP_ACCEPT_ENCODING] => gzip,deflate
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_KEEP_ALIVE] => 300
    [HTTP_CONNECTION] => keep-alive
    [HTTP_COOKIE] => __utma=254095176.1255115685.1216653995.1217433355.1217961853.4; __utmz=254095176.1216653995.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
    [HTTP_CACHE_CONTROL] => max-age=0
    [PHP_SELF] => /server.php
    [REQUEST_TIME] => 1220382417
    [argv] => Array
        (
        )

    [argc] => 0
)

So, I get a error in mysql insert: Data too long for column 'sess_ipaddress' at row 1(Errno=1406)

So, we need a greater sess_ipaddress column or a way to strip the :fff from IP.


Form is loading...