Jump to content

suhosin.post.max_vars


Recommended Posts

Hello , 

 

I get this error 

Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form 1000 for suhosin.post.max_vars.
1000 for suhosin.request.max_vars.
Please ask your hosting provider to increase the suhosin limit to 1396 at least or edit the translation file manually.

 

i changed max_input_vars = 10000 in all php.ini file in my server .

 

the problem is , in none of them i dont have suhosin.post.max_vars !!

 

but i dont know why i get this error . 

 

server linux debian 6 

 

can you tell me how can i resolved this problem 

 

 

Link to comment
Share on other sites

Add this to the .htaccess file, it will work. It did not work for me when i edited my php.ini file.

Add this line  in .htaccess after any of the if blocks.:

 

php_value max_input_vars 5000

 

 

Iam not sure about the suhosin patch though. The above should work in either case.

Edited by indus (see edit history)
Link to comment
Share on other sites

Add this to the .htaccess file, it will work. It did not work for me when i edited my php.ini file.

Add this line  in .htaccess after any of the if blocks.:

 

php_value max_input_vars 5000

 

 

Iam not sure about the suhosin patch though. The above should work in either case.

where i can to add and what is the format of syntax just write any where php_value max_input_vars 5000 ?

Link to comment
Share on other sites

Does the php info file show what the variable is set at?

it is really strange , 

here is INFO_CONFIGURATION

 

max_execution_time 3000 3000 max_file_uploads 20 20 max_input_nesting_level 64 64 max_input_time 3000 3000 max_input_vars 10000 10000

 

 

as you see value is 10000

 

but still show me same error 

Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form 1000 for suhosin.post.max_vars.

1000 for suhosin.request.max_vars.

Please ask your hosting provider to increase the suhosin limit to 1441 at least or edit the translation file manually.

Link to comment
Share on other sites

Is your site live where I can see the php info file, suhosin is different than the regular max_input_vars. The extension might not be loaded. 

exactly thats the problem some extension maybe missed , but why prestashop asking for it when max_input_vars is available ,

it is not live yet :(

Link to comment
Share on other sites

If you are using ubuntu , i believe the php version is preconfigured with Suhosin. At least on my server it is. Iam using Ubuntu 12.04 but that is due to my host providing it with the LAMP install. There is a separate package also, but its not really needed. If you have suhosin preconfigured, check your apache logs, it will show the message when you restart apache. If you are using php 5.4 and above, Suhosin is not needed.

 

You will see this in logs :

 

 Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
 

Edited by indus (see edit history)
Link to comment
Share on other sites

Prestashop or suhosin?

For suhosin

 

If you are using ubuntu , i believe the php version is preconfigured with Suhosin. At least on my server it is. Iam using Ubuntu 12.04 but that is due to my host providing it with the LAMP install. There is a separate package also, but its not really needed. If you have suhosin preconfigured, check your apache logs, it will show the message when you restart apache. If you are using php 5.4 and above, Suhosin is not needed.

 

You will see this in logs :

 

 Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations

 

it running Debian

type this command $php --version , it shows php ver is 5.3.28 , but i update it , i have Zend Enginf on my server shall i update is as well ?

 

------------

result of php -i  , i was many things about suhosin and exactly line cuze of that i get error shows 

 
suhosin.post.max_value_length => 1000000 => 1000000
suhosin.post.max_vars => 1000 => 1000
 
 
any idea from where i can to change that parameter?
Link to comment
Share on other sites

Problem Solved 

 

First 

# php -i | grep php.ini

it will show you the Loaded Configuration File ==> /etc/......./php.ini

 

if you want to see the amount of your suhosin type 

 

# php -i | grep suhosin.post.max_vars

 

then open php.ini file and add these line 

;;;;;;;;;;;;;;;;;;;;;;

;suhosin        ;

;;;;;;;;;;;;;;;;;;;;;;

suhosin.post.max_vars = 10000 (write your need)

suhosin.post.request_vars = 10000 (write your need)

 

add any sihosin you want to change per line 

then Save 

 

restart webservice 

# service apache2 restart 

then 

/etc/init.d/apache2 restart

 

again if you type 

 

# php -i | grep suhosin.post.max_vars

 

suhosin.post.max_vars = 10000

Link to comment
Share on other sites

  • 2 months later...
for me the issue is resolved as follows: 

 

(I use nginx web server) 

 

in / etc/php5/fpm/pool.d/www.conf I added these lines: 

 

php_value [apc.shm_size] = 128M 

php_value [suhosin.request.max_vars] = 3000 

php_value [suhosin.post.max_vars] = 3000 

 

reboot and resolved

Link to comment
Share on other sites

×
×
  • Create New...