Zeus, My module is very similar. Danie is correct; your observations are of a visitor only seeing the hash list of IPs in the same child process. You will need to implement Inter-Process Communication via Shared Memory (apr_shm_*). The example code Danie was referring to was this code: http://www.temme.net/sander/mod_example_ipc/
Hope all goes well. Dave On 5/15/07, Danie Qian <[EMAIL PROTECTED]> wrote:
----- Original Message ----- From: "Zeus Capricorn" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, May 15, 2007 4:14 AM Subject: process pool does not work > Hi,folks. > i want to log the online user's ip in the apache memory and check it > through a specific url. > > first,I use ap_hook_process_connection to log the user's ip and the > time,and i use ap_hook_handler to check the result. > in the callback function of ap_hook_process_connection,i allocate > my_hash(a apr_hash_t) in the pool(c->base_server->process->pool) if > my_hash > is NULL,and set the c->remote_ip as key,a point to the time now as value. > in the callback function of ap_hook_handler,i use apr_hash_next() to > get > the value one by one. > > it works not as what i supposed to do .every client which access my > specific url can only see his own ip and time,not ALL the clients. > > could someone help me ?should i use another pool,or something else? > > thanks in advance. > You need to use IPC shared memory for all child processes to work on the same segment of physical memory. Someone posted a sample code in the archive in year 2004 and could be your good starting point. Daniel
