On Wed, 11 Jun 2008 18:44:15 +0300
"Igor R." <[EMAIL PROTECTED]> wrote:

> Hello All,
> 
> Havng read a lot of articles about FastCGI, I decided to use this
> module to speed up processing of php and RoR applications.
> I use CPanel as a hosting  panel. And I use Apache with suexec
> support as a web server. After compilling apache php and mod_fcgid 
> I faced the problem of determination PHP directives for our server
> users. Tasks of PHP directives don't work with .htaccess file, 
> I wouldn't change the variables in global php.ini file. 
> I have looked through the documentation and I discovered that the way
> to php.ini file can be pointed via variable PHPRC. 
> I've wrote wrapper which installs PHPRC before php execution.
> Everything works perfect if the full path to php.ini file in PHPRC is
> set up, e.g.: 
> 
> [ttyp0:hr4] [13:17] [EMAIL PROTECTED]> cat /usr/local/cpanel/cgi-sys/php5
> #!/bin/bash export PHPRC=~ssitest/public_html/php.ini
> exec /usr/local/cpanel/cgi-sys/php5.bin
> 
> But I don't want to make a new wrapper and change PHPRC variable
> after each new user creation. 
> Is it able to get such data as user's DOCUMENT_ROOT to use this data
> for PHPRC var value, e.g.:
> 
> export PHPRC=$DOCUMENT_ROOT/php.ini
> exec /usr/local/cpanel/cgi-sys/php5.bin
> 
> --
> Regards,
> Igor R.
> WebHostingBuzz.com

My solution for running apache+php-cgi+suexec+mod_fcgid was to create a
special directory for each user (e.g. fastcgi-bin or fcgi-bin) which
would contain a php wrapper script and a php.ini. Nothing needs
customizing, I invoke the php.ini from within the wrapper with this:

PHPRC=`/bin/pwd` (path may differ on your os)

and it works very well, to be frank it works very god darn well both in
terms of performance and security (websites actually feel snappier
than with mod_php).

If you can automate somehow the copying of this directories and the 2
files in each user's home (or wherever you call it from httpd.conf from)
then you're all settled.

> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Mod-fcgid-users mailing list
> Mod-fcgid-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

Reply via email to