[horde] csv file import

Jan Schneider jan at horde.org
Sun Dec 8 10:51:11 PST 2002


Zitat von Greg Johnson <greg.johnson at anderkol.com>:

> Re -  trying to import a csv file into turba, message is:
> > ---------------------------------------------------------------------
> > Warning: Unable to open '/tmp/phpMmZwbF' for reading: No such file or
> > directory in /var/www/horde/lib/Data/csv.php on line 204
> >
> >  Warning: Unable to move '/tmp/phpMmZwbF' to '/tmp/phpMmZwbF' in
> > /var/www/horde/lib/Data/csv.php on line 204
> >
> >  Fatal error: Call to a member function on a non-object in
> > /var/www/horde/lib/Data/csv.php on line 205
> 
> problem appears to be that at line 203 $file_name and
> $_FILES['import_file']['tmp_name'] are the same name, hence the "Unable
> to move 'x'
> to 'x'" message.

How did I miss that? That still won't explain to me the first error message.
Probably PHP first checks if the target file already exists before copying
to it and removes it if so.
 
> have temporarily fixed this problem with the following at line 203:
> /*          $file_name = $tmp_dir . '/' .
> basename($_FILES['import_file']['tmp_name']); */
> 	$file_name = $tmp_dir . '/' . 'xxx';

Try what I just committed. This should be fixed now for everyone who had
problems with the new import code.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the horde mailing list