folder persmissions problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
markldxb
Forum Newbie
Posts: 2
Joined: Fri Sep 29, 2006 5:21 am

folder persmissions problem

Post by markldxb »

I'm running an upload script which requires the code below:
$copy = copy($_FILES['$theFile']['tmp_name'], $filename);

an error message appears:
Warning: Unable to open '' for reading: Permission denied in c...

I'm running Apache on a Windows machine. How do I do CHMOD on my system? Or set folder permissions?

Any solution?
User avatar
waradmin
Forum Contributor
Posts: 240
Joined: Fri Nov 04, 2005 2:57 pm

Post by waradmin »

You dont need to do CHMOD on windows as with apache I understand that each folder is always 0777. However, its trying to file "" which means there is no file. Something is wrong with your syntax because its saying the file isnt there by saying file ""
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: folder persmissions problem

Post by RobertGonzalez »

markldxb wrote:I'm running an upload script which requires the code below:
$copy = copy($_FILES['$theFile']['tmp_name'], $filename);
Change your PHP to this...

Code: Select all

$copy = copy($_FILES[$theFile]['tmp_name'], $filename);
See if that helps.
Post Reply