• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Setup Custom php.ini in plesk 12

MorrisC

Basic Pleskian
All the threads talking bout custom php.ini only apply to up to plesk 11 or non existance. I follow the documentation to setup per domain php.ini, it does not work. Anyone can give me a clear idea of the correct way to setup the custom php.ini for each domain.

In addition, how come .user.ini can not work if i change the parent php.ini

thanks!
 
find my answer for cgi mode....still searching for fastcgi mode for per website....
to create custom php.ini for your plesk windows, you need to switch your customer's website to cgi mode and copy related version php.ini under their httpdocs folder and rename it as
php-cgi-fcgi.ini

http://www.linuxwebservertips.in/custom-php-ini-per-domain-in-plesk-windows-server/

I am wondering why the traditional way of setting custom php.ini file for fastcgi mode would not work on plesk...what has plesk done.......it is windows...it is better not to change too many things
 
Last edited:
Hi,

Is there any way to create a custom php.ini like we can do in suphp cpanel accounts so that we can specify values per folder. For example, I need to use a seprate php.ini for a folder under httpdocs folder say /var/www/vhosts/domain.com/httpdocs/shop folder and I need to use /var/www/vhosts/domain.com/httpdocs/shop/php.ini as custom php.ini for this folder.

Is this possible ?
 
I remembered that setup applies to the root folder (httpdocs) and affects its sub folders....so the default root folder for the main domain is httpdocs...therefore, ...if you want to make it work with individual php.ini, you might have to move that shop folder outside of httpdocs...as for Linux, you will need to move your shop folder outside of httpdocs ( var/www/vhosts/domain.com/shop/)...have not tested it myself.... I remembered that is what other people were saying on other discussion forum.
 
Last edited:
Hi

Thanks for your reply, But even if we moved this outside the httpdocs, I dont think it will work as there is no way for us to specify the php.ini . I tried using

SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/domain.com/httpdocs/shop/php.ini in htaccess and also the below value in vhosts.conf. None is working


<Directory /var/www/vhosts/domain.com/httpdocs/shop>

SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/domain.com/httpdocs/shop/php.ini

</Directory>
 
Back
Top