Move_uploaded_file() only fails when dir created by script

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
Jeroen Oosterlaar
Forum Commoner
Posts: 37
Joined: Sun Nov 06, 2005 4:12 pm

Move_uploaded_file() only fails when dir created by script

Post by Jeroen Oosterlaar »

Hi,

I have a problem that will surely be logical, but I just cannot find the solution. I have a script that instantly creates a directory and then chmod's it to allow another script to add uploaded files to it. But when I run the uploading script I get the SAFE MODE error which says that the script has no right to access the directory. But when I use my FTP client and manually create the directory and manually giving it exactly the same rights, the upload succeeds.

Does anybody knows why this is?

Thanks in advance!

Cheers,

Jeroen
Post Reply