Knowledgebase

Portal Home > Knowledgebase > Articles Database > How to commit changes to suhosin?


How to commit changes to suhosin?




Posted by Necrophorus, 09-15-2010, 03:21 AM
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?

Posted by helpyoulinux, 09-15-2010, 04:26 AM
What exactly you mean by commit ?. Did you save the file after editing the values ?. Which php apache uses ?. There can be more than one php instances and apache might be using different php. You can check it through phpinfo page itself.

Posted by Necrophorus, 09-15-2010, 05:03 AM
I'll explain what I did, step by step in case I'm missing something. First I created a simple page with 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.

Posted by madaboutlinux, 09-15-2010, 09:18 AM
First all make sure the value is defined as follows: and not as You can specify this value in the "suhosin.ini" file and it should work. If not directly specify it in /etc/php5/apache2/php.ini file.

Posted by Necrophorus, 09-15-2010, 09:40 AM
I must have copied this line from one of the many forum post I found, and all the while I didn't notice that missing equal sign. Thanx a lot, madaboutlinux!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Count days in php (Views: 527)


Language:

Contact us