LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 May 13 2005

mahdoum
Member

[PHP] problem

When I try to rename a folder I keep getting and error telling me permission denied.

rename(qweqw,5052933)

is what I am trying to do, I made sure that read, write rights for both file and folder are full what's the prob?

Offline

#2 May 13 2005

samer
Admin

Re: [PHP] problem

bool rename ( string oldname, string newname [, resource context] )

(php.net/rename)

<?php
rename("/geek/leb.txt", "/go/home/leb1.txt");
?> 

rename(qweqw,5052933)

shouldn't quotes be used?

Offline

#3 May 13 2005

rolf
Member

Re: [PHP] problem

try:
print_r(is_dir("qweqw") );
to see if PHP is looking for qwew in the right place. If you get false, it means PHP cannot find the folder.

also from the PHP manual:
Note: Prior to PHP 4.3.3, rename() could not rename files across partitions on *nix based systems.

Offline

#4 May 14 2005

mahdoum
Member

Re: [PHP] problem

=P the right folder is there and I'm not using quotes but variables the line I showed you was from the error. I've tried several stuff I got an error saying cannot find folder, but not it's premission denied.

Offline

#5 August 22 2005

ElectroSoft
Member

Re: [PHP] problem

man set the permission of the folder to 777 if u're running on a linux server ... or remove the Read Only if u're under windows ;)

it should work

Offline

Board footer