Mantis - Quercus
Viewing Issue Advanced Details
2553 minor always 03-25-08 14:10 03-26-08 16:59
mo  
mo  
normal  
closed 3.1.6  
fixed  
none    
none 3.1.6  
0002553: OutOfMemoryError in phpBB3 on database restore
This is under WinXP with PhpBB 3.0.0.

In the Admin Control Panel, create a database backup of
all tables and store it with the gzip option selected.
Then, do a restore operation after selecting the backup
that was just created. This generates a OutOfMemoryError
with the following stack:

$module->load_active()
  $this->module->main() (functions_module.php)
    function main() (acp_database.php)

On line 323, the fgetd function is invoked to parse the contents
of the gzipped file. The JVM runs out of memory in the fgetd()
function (also defined in acp_database.php).

The file descriptor passed to this method was opened by bzopen(),
so it is likely that the combination of the bzip file and the
seek() operations in the fgetd() function are the cause of this
error.

A database backup/restore in plain text (not gzip) works as expected.

Notes
(0002917)
mo   
03-26-08 16:54   
Looking into this bug uncovered a number of issues with gzseek:

php/1v0z.qa
php/1v19.qa
php/1v18.qa

A couple of file module APIs were also broken when dealing with
write only files:

php/161x.qa
php/161y.qa
php/161z.qa
(0002918)
mo   
03-26-08 16:59   
Confirmed that this fixes restore from gzip backup functionality in phpBB3.