Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Fix "GET Variable Name Length Limit Exceeded"

This guide explains what this error means and how to fix it on a server with PHP.

Email2 min read13 steps

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

  1. Log in to cPanel.
  2. Open File Manager.
  3. Go to the folder of your website, often public_html.
  4. Look for a file named php.ini or .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.
  5. Download a copy of the file as a backup.
  6. Add these lines.
    suhosin.get.max_name_length = 512
    suhosin.request.max_varname_length = 512
    suhosin.post.max_name_length = 512
    These lines allow longer variable names. The number 512 is an example. Use a value that fits your case.
  7. Save the file.
  8. 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.

  1. Log in over SSH as root.
  2. 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.
  3. Back it up with cp suhosin.ini suhosin.ini.bak.
  4. Raise the same settings listed above.
  5. Restart the web server so the change applies. The command depends on your system, for example systemctl restart httpd.
Tip: Some hosts do not run Suhosin. If these lines have no effect, ask Hostvento support how to change the limit for your plan: https://secure.hostvento.com/submitticket.php.

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.