#21425 [Opn->Bgs]: rename() - interesting behaviour
| From: | nicos@php.net | Date: | Sun, 05 Jan 2003 13:13:40 +0000 |
| Subject: | #21425 [Opn->Bgs]: rename() - interesting behaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-29100@lists.php.net to get a copy of this message | ||
ID: 21425
Updated by: nicos@php.net
Reported By: linux@psoftwares.hu
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Debian GNU/Linux
PHP Version: 4.3.0
New Comment:
The error is clear it can't find /home/phanatic/temp/users, probably
because of permissions or probably because it's NOT the good directory.
Are you sure ./ is /home/phanatic/temp/?
Anyway this is bogus, if you need any help please take a look at
http://www.php.net/support.php .
Thank you for your report.
Previous Comments:
------------------------------------------------------------------------
[2003-01-05 05:16:29] linux@psoftwares.hu
it's an interesting thing about the rename() function:
the code which doesn't work:
<?php
$base = "/home/phanatic/temp/";
$from = "users";
$to = "userdata";
rename ($base.$from, $base.$to);
?>
and which works (if the script is in the same dir):
<?php
$from = "users";
$to = "userdata";
rename ("./".$from, "./".$to);
?>
error message for the first code:
Warning: rename(/home/phanatic/temp/users,/home/phanatic/temp/userdata)
[http://www.php.net/function.rename]: No such file or directory in
/home/phanatic/temp/test_rename.php on line 8
my configure line:
./configure --with-layout=GNU --with-mysql=shared --with-pgsql=shared
--with-gd=shared --with-gd2 --enable-ftp --with-calendar --with-posix
--
enable-sockets --enable-cli --enable-cgi --enable-pcntl
--with-bz2=shared --with-zlib-dir=/usr/include/ --prefix=/usr
--sysconfdir=/etc/php
hope i could provide all the infos needed to fix this problem...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21425&edit=1