suphp how do raise the limits in the main php.ini file

quizknows

Well-Known Member
Oct 20, 2009
1,008
86
78
cPanel Access Level
DataCenter Provider
/usr/local/lib/php.ini is normally global. You can make sure from a command line with

php -i | grep .ini

Should see:
Loaded Configuration File => /usr/local/lib/php.ini

If you want one site to have it's own php.ini that over-rides those settings, then do this:

cp -p /usr/local/lib/php.ini /home/$USERNAME/public_html/php.ini

then add this to the users .htaccess in public_html/.htaccess:

suPHP_ConfigPath /home/$USERNAME/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

You can then change settings in that users php.ini to over-ride global defaults. You can make a phpinfo() file to make sure your changes like memory limit are set correctly.
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
86
78
cPanel Access Level
DataCenter Provider
SuPHP is configured in /opt/suphp/etc/suphp.conf but I don't think there are any memory limits there. What do you mean by you need the "ram limit to be higher?" You don't mean php memory_limit?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,072
32
178
Finland
cPanel Access Level
Root Administrator
No this would be for the whole server and yes I nee to change it in the php.ini file.

These are suphp process variables in the php.ini. Not paths or Apache variables.
In SSH command prompt (as root) type:

Code:
php --ini
you get something like this:

Code:
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)
The line:
Loaded Configuration File: /usr/local/lib/php.ini
tells that your server's PHP is using file /usr/local/lib/php.ini

In that file you can do the changes you desire.