Skip to content

Temporary uploaded file not deleted #4370

@pma-import

Description

@pma-import

phpMyAdmin 3.0.0
php 5.2.6
MySQL 5.0.67
Windows 2003 server
IIS 6

open_basedir is defined in php.ini

When trying to import a .sql file, it gets uploaded from my local drive and then the temporary file on the server is moved into the ./tmp folder inside the phpMyAdmin folder. The data is imported correctly.

The problem is that the temporary file inside the ./tmp folder does not get deleted after the import, even though there are sufficent permissions to delete it.

Near the bottom of import.php is the following code which deletes the temporary file that was created for the import.

// Cleanup temporary file
if ($file_to_unlink != ’’) {
unlink($file_to_unlink);
}

By inserting
fclose($file_to_unlink);

prior to the
unlink($file_to_unlink);

the temporary file in the phpMyAdmin/tmp folder will get deleted after the import.


- Original URL: https://sourceforge.net/p/phpmyadmin/patches/423/
- Original author: dmisc

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions