get ALL virtual hosts

From: Date: Fri, 17 Dec 2004 07:15:12 +0000
Subject: get ALL virtual hosts
Groups: php.internals php.pecl.dev 
Request: Send a blank email to internals+get-14108@lists.php.net to get a copy of this message
Hi List, I try to build up an apache module in C which interacts with an Apache Modul and stumbled over a curious thing. I have several virtual hosts and wish to read a configuration of ONE of them. unfortunatly the call: serv = SG(server_context)->r->server for( ; serv ; serv->next) { serv->hostname } will result in different data. Example httpd.conf: ... <VirtualHost 127.0.0.1> ... </VirtualHost> <VirtualHost 127.0.0.2> ... mymod_enable=true </VirtualHost> <VirtualHost 127.0.0.3> ... </VirtualHost> If I call the PHP script at 127.0.0.3 I got: 127.0.0.3 127.0.0.2 = ON 127.0.0.1 But if I call the PHP script at 127.0.0.1 I got: 127.0.0.1 Am I stupid? Didn't should give me serv = SG(server_context)->r->server always the first one ??? How to get the first if I'm the last other with "serv->next" cause there ist NO "serv->prev" :-( regards Goetz

« previous php.internals (#14108) next »