#1964 - TMPPATH is mis-defined in index.php.

TMPPATH is currently defined with a double-backslash.

VARPATH is defined by:
define("VARPATH", realpath("var") . "/");

Then, TMPPATH is defined by:
define("TMPPATH", VARPATH . "/tmp/");

... which results in something like .../gallery/var//tmp/

Yikes!!! It's a good thing PHP is fool-proof enough that this hasn't caused too many issues to date.