I need my PHP Server and MySQL DB be without limits, so it can process a request that takes hours(!).
I already set the maximum execution time of php to 10 hours and the memory_limit to -1 (unlimited) in the php.ini, which I checked in the phpinfo() and its set as it should be. But still, when I start a script to count the lines of my over 500 mySQL tables (the database is 50GB big) I get the error:
Fatal error: Out of memory (allocated 12582912) (tried to allocate 11534316 bytes) in C:\xampp\htdocs\do.php on line 40
My hardware shouldnt be the Problem (lots of RAM, HDD, etc. btw: its running on windows 7), and reading in the .csv data took my pc 5.5 hours, but worked without problems
(mysql_query("LOAD DATA INFILE '$datei' INTO TABLE $tab FIELDS TERMINATED BY ' ' LINES TERMINATED BY '\r\n';"))
Now I just wanna count the lines with the following script:
- Code: Select all
$result=0;
for ($i=1;$i<=585;$i++) {
if ($i!=438) {
$tab="f".$i;
echo $tab."<br>";
$abfrage=mysql_query("SELECT ID FROM $tab")or die(mysql_error());
$result=$result + mysql_num_rows($abfrage);
}
}
echo $result;
Its getting to table 32+- and then gives mit the fatal error.
Does anyone know how this can happen? Is there something else I have to change to get rid of all the limits set?
Thanks for your help
Alex
PS: Please don't try to convince me php/mySQL is not good for 50GB data, I just have to use it