我使用WP的测验插件,在添加太多问题后导致了504网关超时。
开发人员告诉我使用以下代码更新我的.htaccess
文件:
php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
在添加3行代码之前,这是.htaccess
代码:
# 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
这是在我添加了代码之后:
# 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
我也试过这样做:
# 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
但是,两者都会导致500内部服务器错误。 我不确定自己做错了什么,并希望能够深入了解它。
这是插件开发者告诉我使用的FAQ / Article的链接。 https://www.ohmyquiz.io/knowledgebase/get-fatal-error-save-big-quiz/
答案 0 :(得分:-2)
php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
# 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