Answer the question
In order to leave comments, you need to log in
PhpMyAdmin. There is an error due to php_max_input_vars. How to fix?
Hello!
I have a MySQL database with several tables. Among these tables is a table that stores a list of countries. I parsed wikipedia to get an array of countries - the result was an array with a length of 51 values. I wrote a very sluggish PHP script that looped through an array and for each element made a request to the database to insert a new row:
<?php
require("modules/php/database.php");
$countries = array(/*массив со странами длиной 51*/);
foreach ($countries as $country) {
echo $country . "<br>";
db_add_country($country);
}
function db_add_country($country){
$db = db_connect();
$query = "INSERT INTO countries VALUES(NULL, ?)";
$stmt = $db->prepare($query);
$stmt->bind_param("s", $country);
$stmt->execute();
}
?>
expose_php = Off
max_execution_time = 180
max_input_time = 180
;max_input_nesting_level = 64
max_input_vars = 10000000000000000000000000000000000000
memory_limit = 1536M
Answer the question
In order to leave comments, you need to log in
max_input_vars = 10000000000000000000000000000000000000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question