quoteslogy

Registered
Jul 14, 2016
1
0
1
united kingdom
cPanel Access Level
Website Owner
Hi!

I needed to change some suhosin settings on my web server, but after reading through several forums I still don't know how to commit these changes. I modified the necessary values in
/etc/php5/cli/php.ini,
/etc/php5/cgi/php.ini,
/etc/php5/apache2/php.ini,
/etc/php5/apache2/conf.d/suhosin.ini
but no effect at all. Phpinfo still reports the old (default) values.

I reloaded apache several times but it didn't help. Maybe reload is not enough and I should restart it?

- Removed -
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Your access level is listed as "Website Owner". Do you have root access to this system? If so, and assuming you are using EasyApache 3, you can simply add the values to your /usr/local/lib/php.ini file and then restart Apache.

Thank you.
 

Webile Technologies

Registered
Jul 12, 2016
2
0
1
Ahmedabad
cPanel Access Level
Website Owner
I'll explain what I did, step by step in case I'm missing something.

First I created a simple page with <?php phpinfo (); ?> in it.
I found the following:

Configuration File (php.ini) Path /etc/php5/apache2

Loaded Configuration File /etc/php5/apache2/php.ini

Scan this dir for additional .ini files /etc/php5/apache2/conf.d

additional .ini files parsed /etc/php5/apache2/conf.d/curl.ini, /etc/php5/apache2/conf.d/gd.ini, /etc/php5/apache2/conf.d/imagick.ini, /etc/php5/apache2/conf.d/imap.ini, /etc/php5/apache2/conf.d/mcrypt.ini, /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/suhosin.ini, /etc/php5/apache2/conf.d/xsl.ini

I needed to set suhosin.post.max_vars to 400, so I inserted a line: suhosin.post.max_vars 400 into /etc/php5/apache2/php.ini
I reloaded apache, then reloaded the info page, but according to phpinfo suhosin still used the old 200 value for suhosin.post.max_vars.

Wrong config file, I thought, so I inserted the same line into /etc/php5/cgi/php.ini. Apache reload, info page reload, but suhosin.post.max_vars was still 200.

I started to get pissed off, so I put suhosin.post.max_vars 400 into /etc/php5/cli/php.ini and in /etc/php5/apache2/conf.d/suhosin.ini as well. Apache and info page reload again, but still no effect.

I was wondering if there was something else to reload or restart other than apache. There shouldn't be but I ran out of ideas of how to set this value to 400.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463