Re: Moving a file with 'rename'?

From: Date: Thu, 04 Jul 2002 13:25:53 +0000
Subject: Re: Moving a file with 'rename'?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105435@lists.php.net to get a copy of this message
rename can "move" the file only on the same partition, it is realy just _rename_, not full _move_ Marek Tim Stoop wrote:
Hi people, I want to move a file from one location to another. I expect I can only do this with 'rename', because there's no 'move'-command (at least nog in the manual). Following situation: original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos new location: /var/www/html/foto/0/0/0/0/0000.thumb.jpg syntax: rename($old_location, $new_location); Error: Warning: Rename failed (Invalid cross-device link) in /home/cvd/sandbox/webfotos/admin/save.php on line 95 When I 'su' to 'apache' (the user under which the httpd is running), I can do the following without any error: mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg /var/www/html/foto/0/0/0/0/0000.thumb.jpg Any ideas on why I get the error and how I can solve it? Tia!


« previous php.general (#105435) next »