ID: 21425 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Debian GNU/Linux PHP Version: 4.3.0 New Comment:
Assuming that you run this script with the Command Line version (not through your webserver), can you run: strace php yourscript.php and put this output somewhere online? We should be able to figure out what fails in the script. Derick Previous Comments: ------------------------------------------------------------------------ [2003-01-05 07:34:55] [EMAIL PROTECTED] perms of the file: -rw-r--r-- 1 phanatic phanatic 99 Jan 5 10:36 users perms of the dir: drwxr-xr-x 5 phanatic phanatic 4096 Jan 5 12:06 temp but in my opinion, if this happens because of the permissions, then why does the second script work? thanx in advance... ------------------------------------------------------------------------ [2003-01-05 07:24:20] [EMAIL PROTECTED] Can you please show us the permission of the directory and of the files please? It looks I really CAN NOT reproduce it there... Thank you. ------------------------------------------------------------------------ [2003-01-05 07:21:23] [EMAIL PROTECTED] the file is there, i'm sure about it... and the script itself is in '/home/phanatic/temp', too!!! so it's not a bogus in my opinion... just test it yourself. ------------------------------------------------------------------------ [2003-01-05 07:13:40] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [2003-01-05 05:16:29] [EMAIL PROTECTED] 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