Recursive error in PHP

260 views Asked by At

I am trying to migrate a database from an old XP machine to a new Synology DS213. I successfuly imported the database and mirrored permissions, but am having trouble actually getting the website to work. I run out of memory no matter how high I raise the max memory limit.

I was able to install the xdebug extention to help me debug. I have tryied I quickly run out of memory with the following error: (this is just the first couple of lines)

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 70987243 bytes) in /volume1/web/includes/phpFunctions.php on line 203 Call Stack: 0.0011 324280 1. {main}() /volume1/web/index.php:0 0.0024 324728 2. require('/volume1/web/includes/phpFunctions.php') /volume1/web/index.php:14 0.0646 337424 3. phpMySQL->dbQuery() /volume1/web/includes/phpFunctions.php:35 0.0653 337568 4. phpMySQL->stopProcess() /volume1/web/includes/db/mySQL.php:69 0.0655 337968 5. myErrorHandler() /volume1/web/includes/db/mySQL.php:254 0.0662 343400 6. raiseError() /volume1/web/includes/phpFunctions.php:160 0.0670 344608 7. phpMySQL->dbQuery() /volume1/web/includes/phpFunctions.php:209 0.0678 345792 8

I am at a loss. I don't expect anyone to solve it for me, but hopefully point me in the right direction to learn more about the errors.

1

There are 1 answers

1
Hadi On

Try add this line to your script (possibly in index.php) -

@ini_set('memory_limit', '1G');

If this doesn't work then try import database again in this way - first import 2/3 table then again next 2/3 table and so on and also make sure that there is no infinite loop(s).