W
wiseguy
Guest
WARNING! FOLLOW THIS HOWTO ON YOUR OWN RISK! IT WORKED FOR ME, BUT I CAN'T GUARANTEE THAT IT WILL WORK FOR YOU!
I'm running Plesk Panel 9.2.2 on CentOS 5.3 with PHP 5.2.9 (installed from the AtomicRocketTurtle.com yum repository).
1. Move /usr/bin/php-cgi to /usr/bin/php-cgi.app
2. Create a new /usr/bin/php-cgi file and put the following lines in it:
3. Create the directory /etc/php-ini.d/
4. Check domain/ftpuser UID for which you want to have a custom php.ini.
Example /etc/passwd:
icann:x:10001:2523::/home/httpd/vhosts/icann.org:/bin/false
4. Copy the original /etc/php.ini to /etc/php-ini.d/php-10001.ini
5. Make any changes you want to php-10001.ini
6. Run service httpd reload
Done!
This howto is based on this blog post: Plesk, PHP, FCGI, and the quest for the custom 'php.ini' per domain
I've done 2 small changes to the provided script.
I'm running Plesk Panel 9.2.2 on CentOS 5.3 with PHP 5.2.9 (installed from the AtomicRocketTurtle.com yum repository).
1. Move /usr/bin/php-cgi to /usr/bin/php-cgi.app
2. Create a new /usr/bin/php-cgi file and put the following lines in it:
Code:
#!/bin/sh
#
# Custom PHP FCGID wrapper for Plesk domains
#
PHPRC="/etc/php-ini.d/php-${UID}.ini"
[ -f ${PHPRC} ] || PHPRC="/etc/php.ini"
export PHPRC
exec /usr/bin/php-cgi.app
3. Create the directory /etc/php-ini.d/
4. Check domain/ftpuser UID for which you want to have a custom php.ini.
Example /etc/passwd:
icann:x:10001:2523::/home/httpd/vhosts/icann.org:/bin/false
4. Copy the original /etc/php.ini to /etc/php-ini.d/php-10001.ini
5. Make any changes you want to php-10001.ini
6. Run service httpd reload
Done!
This howto is based on this blog post: Plesk, PHP, FCGI, and the quest for the custom 'php.ini' per domain
I've done 2 small changes to the provided script.