Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52271 invoked by uid 1010); 9 Mar 2005 01:55:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52256 invoked from network); 9 Mar 2005 01:55:07 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 9 Mar 2005 01:55:07 -0000 X-Host-Fingerprint: 64.233.184.194 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.194:34964] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id 3C/41-53294-B775E224 for ; Tue, 08 Mar 2005 20:55:07 -0500 Received: by wproxy.gmail.com with SMTP id 37so77002wra for ; Tue, 08 Mar 2005 17:55:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KTD/Ey6Vymwgi8TSGK8DbzVxbfU1zV8BWxtjhaDIXNjA6SGZRpYxQHhdqADWZ9TWkyfcS4AdCvt/z+1Gqpg8Lrr+i8lCLw4ZgBAAUApfls0ZSJHKRKNI8BElfc811LLdpgnMnirpmufJYJCRcSeLHTLWxOkLYYoQ+ekuZuC//ek= Received: by 10.54.45.14 with SMTP id s14mr338291wrs; Tue, 08 Mar 2005 17:55:05 -0800 (PST) Received: by 10.54.44.57 with HTTP; Tue, 8 Mar 2005 17:55:05 -0800 (PST) Message-ID: <4e89b42605030817557a9b5b1e@mail.gmail.com> Date: Tue, 8 Mar 2005 20:55:05 -0500 Reply-To: Wez Furlong To: daniel.simser@techmeridian.com Cc: internals@lists.php.net In-Reply-To: <1110296206.8309.5.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1110296206.8309.5.camel@localhost.localdomain> Subject: Re: [PHP-DEV] how to get document_root in extension From: kingwez@gmail.com (Wez Furlong) If apache is the only platform you're targeting, you can get at the apache request structure like this: request_rec *r; r = ((request_rec *) SG(server_context)); If you're running under a different web server, you'll most likely blow it up shortly after this point. If you want a degree of platform independence, take a look at SAPI.h, our server API abstraction layer. --Wez. On Tue, 08 Mar 2005 08:36:46 -0700, Daniel Simser wrote: > How does one retrieve the current "document_root" and/or other apache > specific information from within an extension. > > I'm just starting to write an extension as a learning process now, but I > have an extension that I would like to write, but need to learn first. > > Thank you for any help, > Daniel > > -- > Daniel Simser > TechMeridian, Inc. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >