1

I'm using a quiz plugin for WP which caused a 504 Gateway Timeout after adding too many questions.

The developer told me to update my .htaccess file with the following code:

php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000

This is the .htaccess code before I added the 3 lines of code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

And this is after I've added the code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
</IfModule>

# END WordPress

I also tried doing it like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000

# END WordPress

However, both cause a 500 Internal Server Error. I'm not really sure what I'm doing wrong and was hoping to get your insight on it.

Here's a link to the FAQ / Article the developer of the plugin told me to use. https://www.ohmyquiz.io/knowledgebase/get-fatal-error-save-big-quiz/

  • Did you see the part that says It can show a « error 500 ». If it does, remove the 3 lines from the .htaccess and try the next method? Did you try the second method? I suggest consulting with your web host, this will be specific to their configuration. – Milo Jul 8 '17 at 16:16
3

As there are different modes that PHP can run in, it may be causing the internal server error (ie: FastCGI). You are better setting those values in your php.ini file or user.ini file to see if works that way.

In your php.ini or user.ini file, do the following:

max_input_vars = 5000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.