Re: wonder why php as apache module can work with virtual host

From: Date: Mon, 05 Aug 2002 06:10:33 +0000
Subject: Re: wonder why php as apache module can work with virtual host
Groups: php.general 
Request: Send a blank email to php-general+get-111160@lists.php.net to get a copy of this message
>I dunno why some webhosting company can do virtual host by php as apache >module. That means they seem to work fine with the virtual host uid/gid >permission when using php. But they use php as apache module....how do >to that ?? Basically, PHP is running as the same User as Apache, which is defined by User in httpd.conf This User (unless you're an idiot) is 'nobody' or some similarly under-powered user. Any files PHP has to read/write/execute must thus be allowed that access to 'nobody' (or whatever User is set to) for it to be possible. It is also possible to set up PHP as a CGI wrapped by suExec (don't do both suExec and safe mode -- won't work) and then have suExec run PHP as a specific user. Once you've worked out that wrinkle, it's pretty trivial to wrap the suExec around PHP CGI differently in each VirtualHost block, and give your PHP users the best of both worlds. My host does this, and I thank him for it, oh, every month or so :-) -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.

« previous php.general (#111160) next »