I would like to fetch the content from a mysql-table to another. The table contains ~312000 rows, only numeric/decimal values with a total size of ~22 MB. The "funny thing": Everything works fine but after writing row 236991 the whole skript stops with an internal server error 500. mysqli_num_rows shows the correct value of 312000 and also my second script (below) works as expected.
PHP 7.0.33 / Mod-PHP / Apache2 / Debian 9
// Stops with an internal Server Error 500
$fetch = mysqli_query($connection1,"SELECT `a`,`b`,`c` FROM `table`");
while($f = mysqli_fetch_array($fetch,MYSQL_ASSOC)) {
mysqli_query($connection2,"INSERT INTO `table` (a,b,c) VALUES ('$f[a]','$f[b]','$f[c]')");
}
// Works perfect
$val = 0;
$fetch = mysqli_query($connection1,"SELECT `a`,`b`,`c` FROM `table`");
while($f = mysqli_fetch_array($fetch,MYSQL_ASSOC)) {
$val++;
}
echo $val; // 312000 the correct result