|
|||
|
Hello.
The issue of implementing a user php.ini by using FastCGI (Fcgid) in this Cpanel me back a little bit crazy. The question is that following the manual and the post is in these forums, not that it is applied using a php.ini per user. According manual y use /usr/local/apache/conf/userdata/std/2/<user>/<domain>/*.conf and this work because if put any directive for managed php values, fails reload apache. Also Apache read config file put in this folder. Weel, on this folder i put a file named php.conf with several test. On last according FCgid, put DefaultInitEnv PHPRC=/home/censo/php Nothing. Imposible for me that apache read php.ini on user home. Any ideas? |
|
|||
|
Running fcgid on one of our servers to test it out. So far it has significantly lowered the load on the machine but we're unable to use custom php.ini 's.
Is there anyone who know's how to use custom php.ini's with fcgid, eaccelerator? We've tried both using a wrapper (even if fcgid is running as the default php option) and using php.ini in each folder where php executes. Nothing seems to be helping. Anyone?
__________________
|
|
|||
|
Hi, I just tried a few modifications for fcgi as apache handler and thereby I found something that might be interesting for you.
For giving every account its own php.ini, I made the following. 1. Make a backup of your files 2. Within the accounts public_html folder put a .htaccess file with the following lines in it: PHP Code:
--First one is the copy of your php.ini with your modifications --The second file name php5.fcgi and add the following lines in it: PHP Code:
PHP Code:
Also be careful of the chmod you are giving to the php.ini for example. Depending if you wish to make your customers able to change it or if you just want to be the only one to administrate it. Only be careful, if you recompile or update your apache, the php.conf file will be overwritten and you have to rework it. Hope it helps. Last edited by mikesta; 01-28-2009 at 04:25 AM. |
|
|||
|
Thanks Mikesta, gonna have a go at it now.
You can probably add those changes to: /usr/local/apache/conf/includes/pre_virtualhost_global.conf to keep them between easyapache updates. So leave the default info in php.conf and add your other stuff in that file. I'll get back to you with my results
__________________
|
|
|||
|
Made a few changes:
2. Code:
AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php5.fcgi 4. Left php.conf as it was default and added: Code:
MaxProcessCount 1000 DefaultMaxClassProcessCount 100 IPCConnectTimeout 60 IPCCommTimeout 60 PHP_Fix_Pathinfo_Enable 1 IdleTimeout 900 IdleScanInterval 120 BusyTimeout 300 BusyScanInterval 120 ErrorScanInterval 9 ZombieScanInterval 9 ProcessLifeTime 3600 This makes it possible for users to choose through .htaccess if they want to use custom php.ini or not instead of enforcing it on them. Have one issue though. Custom php.ini with eaccelerator enabled in it will result in core dumps. Any idea why this happens?
__________________
|
|
|||
|
Found my old thread. The core dumps were because of mpm-worker being multithreaded and eaccelerator not. Switched to prefork instead for now - might switch back to worker later and use APC as an accelerator instead. (Magento got hooks for APC etc)
__________________
|
|
|||
|
Just a heads up - easyapache comments out
Code:
AddHandler php5-fastcgi .php If anyone know a workaround to this "feature" let me know.
__________________
|
|
|||
|
Quote:
php works as suPHP on my server, but I need to enable fcgi-php handler for one account. Can I use this guide? I can't find /usr/local/cpanel/cgi-sys/php5 file, please help...... |
![]() |
| Tags |
| fastcgi , fcgid , php.ini , virtualhost |
| Thread Tools | |
| Display Modes | |
|
|