It will be greate to customise tmp directory instead of use /tmp

On some provider, we are not able to write in the tmp directory.

Thanks
Thomas

Comments

dmuth’s picture

Assigned: Unassigned » dmuth

> On some provider, we are not able to write in the tmp directory.

You're kidding. o.o

Okay, I'll put that on my TODO list for you.

-- Doug

dman’s picture

Yes, you can't rely on the hardcoded /tmp path. Plus problems for FAT/Win32 installs.

The /tmp directory to use should be configured through Drupal configuration > filesystem

Better to go: backup_lib.php

	//
	// Now tar up the contents of this directory
	//
	$backup_tmp = tempnam(file_directory_temp() , "backup-htdocs-");
jpsalter’s picture

Three changes are needed to make the backup.module respect Drupal's temporary directory settings (I think only three...):

In the file - functions.inc.php make the following changes:

line 31:
$db_file_tmp = tempnam(file_directory_temp(), "drupal-backup-db-");

line 146:
if ($file == $prefix_dir || $file == file_directory_temp()) {

line 227:
$backup_tmp = tempnam(file_directory_temp(), "backup-htdocs-");

These changes finally got backup.module working for me.

Cheers,