What does the error mean?
When you open a web address, extra details can follow a question mark. For example page.php?name=Sam. Here name is a GET variable. A GET variable is a named piece of data in the web address.
Suhosin is a security add-on for PHP. PHP is the language many websites are built with. Suhosin sets a limit on how long a variable name may be. If a name is longer than the limit, it blocks the request and logs a message like "GET variable name length limit exceeded".
This can happen on admin pages, forms with many fields, or links with long names. The limit is there to stop attacks, but sometimes it blocks normal use.
Before you start
Changing PHP settings can affect your whole site. Take a backup of the file you edit first. Raise limits only a little, and only as much as you need.
Steps on shared hosting with cPanel
- Log in to cPanel.
- Open File Manager.
- Go to the folder of your website, often
public_html. - Look for a file named
php.inior.user.ini. If there is none, create a new one. You may need to turn on Show Hidden Files in the settings to see dot files. - Download a copy of the file as a backup.
- Add these lines.
These lines allow longer variable names. The number 512 is an example. Use a value that fits your case.suhosin.get.max_name_length = 512 suhosin.request.max_varname_length = 512 suhosin.post.max_name_length = 512 - Save the file.
- Wait a few minutes, then reload the page that gave the error.
Steps on a VPS or dedicated server
You need root access for this. Root is the all-powerful user account.
- Log in over SSH as root.
- Find the Suhosin settings file. Its location depends on your system. Often it is in a PHP configuration folder, such as
/etc/php.d/suhosin.ini. - Back it up with
cp suhosin.ini suhosin.ini.bak. - Raise the same settings listed above.
- Restart the web server so the change applies. The command depends on your system, for example
systemctl restart httpd.
Quick recap
- The error means a variable name in a web address or form is longer than the allowed limit.
- Suhosin, a PHP security add-on, sets the limit.
- Back up first, then raise the Suhosin name-length settings a little.
- Reload the page to test.