Differences

This shows you the differences between two versions of the page.

Link to this comparison view

guides:how-to-set-custom-php-ini-values-in-cagefs-for-php-selector [2016-08-24 12:07:42] (current)
rory.blanchard created
Line 1: Line 1:
 +====== How to Set Custom php.ini Values in Cagefs for PHP Selector ======
  
 +CloudLinux'​s Cagefs allows each user to have their own custom php.ini settings with the php selector. However the options presented inside have pre-defined limits that may not work for all users.
 +
 +It is possible to modify custom settings by hand through the command line.
 +
 +Start by going into the command line. After you're in, run the following command to get into the specific user's caged environment:​
 +
 +<​code>​
 +cagefsctl -e <​username>​
 +</​code>​
 +
 +This will take you to a new prompt. Once there, you can use a text editor to modify the php settings directly:
 +
 +<note warning>
 +Make sure to edit the correct file for the version of PHP you have selected otherwise the changes will not go into effect. Replace the **XX** with your version of PHP, so for version 5.4 the path would be /​opt/​alt/​php54/​link/​conf/​alt_php.ini
 +</​note>​
 +
 +<​code>​
 +nano /​opt/​alt/​phpXX/​link/​conf/​alt_php.ini
 +</​code>​
 +\\
 +
 +Once there, you will see a section like this:
 +
 +<​code>​
 +;>=== Start of PHP Selector Custom Options ===
 +;<=== End of PHP Selector Custom Options =====
 +</​code>​
 +\\
 +Inside of this section, you can put in your custom **PHP Variables** such as memory_limit,​ post_max_size or any other thing you may need to change. You should put them just as if you were modifying any php.ini file, but keep them in that section to make it easy to find later if you need to change it again.
 +
 +<​note>​
 +If you've already modified your PHP options within the PHP selector, you will see some custom values in that section.
 +</​note>​
 +\\
 +\\