Re: Moving a file with 'rename'?
| From: | Latex Master | Date: | Thu, 04 Jul 2002 13:21:43 +0000 |
| Subject: | Re: Moving a file with 'rename'? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105434@lists.php.net to get a copy of this message | ||
Hello Tim,
Tim why don't you try shell_exec ?
Thursday, July 4, 2002, 5:03:34 PM, you wrote:
TS> Hi people,
TS> I want to move a file from one location to another. I expect I can only do
TS> this with 'rename', because there's no 'move'-command (at least nog
TS> in the
TS> manual). Following situation:
TS> original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg
TS> with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos
TS> new location: /var/www/html/foto/0/0/0/0/0000.thumb.jpg
TS> syntax: rename($old_location, $new_location);
TS> Error: Warning: Rename failed (Invalid cross-device link) in
TS> /home/cvd/sandbox/webfotos/admin/save.php on line 95
TS> When I 'su' to 'apache' (the user under which the httpd is running), I
TS> can
TS> do the following without any error:
TS> mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg
TS> /var/www/html/foto/0/0/0/0/0000.thumb.jpg
TS> Any ideas on why I get the error and how I can solve it? Tia!
TS> --
TS> Kind regards,
TS> Tim
--
Best regards,
Latex mailto:freeman@submission.org.ru