class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I have an issue. When using the upload script and automatically creating a directory everything works fine. But when I try ro delete that directory that was just created I get a permission denied from the server. Even when I try to change it to 777 it will not let me. I still get a permission denied or even an error sometimes.
If I create a directory on the server manual everything is ok I can delete it. Only directories that are created with the php class upload are the issue.
I also think that it could be some sort of the image beign "locked"? is that possbiel? I am just take a shot in the dark.
I would guess that it is because PHP creates the directory under the PHP or webserver user.
So via FTP, you can't delete it since you are the FTP user, or anyway an user different that the webserver/PHP user.
Try maybe using the PHP function chmod() to change the user. Alternatively, you can write a simple PHP script which would delete the directory for you.Reply
I've tried both ways and still not luck in deleting the test directories. I tried on a diffrent server and received the same error. Is there anything else I can try? or dies this script not work on shared servers?
Thanks for taking the time out to trouble shoot this. I can see the properties for the directory in my FTP client (ACE FTP3)I can also see them via the cpanel. Whats weird is that when I try to CHMOD via cPanel it shows the the directory is 777 but when I use my FTP it shows it as 755.
I am the user and owner so I think that it should allow me to make the changes.
I do not understand what do you mean by copying and pasting the listing.
I'm afraid that you will have to ask your hosting company for some help. It is possible that they've wrongly configured their server. Maybe the suid set on user accounts...
If you follow my solution, you don't let the script generate your folders. You create your own, using these commands, just after the <?php of upload.php
No, thank you for coding Photoshop CS2 into an upload script. It is wonderful, told all my friends about it! I hope my comment will be of some use!Reply
If you want to help beyond sending useful comments and doing tests, you can rate the class on PHP Classes, or Hotscript; you can also write a review for the class; or even donate a little bit!Reply
I have an issue. When using the upload script and automatically creating a directory everything works fine. But when I try ro delete that directory that was just created I get a permission denied
from the server. Even when I try to change it to 777 it will not let me. I still get a permission denied or even an error sometimes.
If I create a directory on the server manual everything is ok I can delete it. Only directories that are created with the php class upload are the issue.
I also think that it could be some sort of the image beign "locked"? is that possbiel? I am just take a shot in the dark.
Any help would be greatly appreciated.
Thanks
Thanks again.
So via FTP, you can't delete it since you are the FTP user, or anyway an user different that the webserver/PHP user.
Try maybe using the PHP function chmod() to change the user. Alternatively, you can write a simple PHP script which would delete the directory for you.
I've tried both ways and still not luck in deleting the test directories. I tried on a diffrent server and received the same error. Is there anything else I can try? or dies this script not work on shared servers?
Thank you again.
I am the user and owner so I think that it should allow me to make the changes.
I do not understand what do you mean by copying and pasting the listing.
Thanks again for taking out the time.
By listing, I meant the log.
The thing you've got to do is this: disable these in both class.upload.php and upload.php:
If you follow my solution, you don't let the script generate your folders. You create your own, using these commands, just after the <?php of upload.php
$folderName is a variable you post from the form Process('../YourFolder/'.$imageName.'');
You'll see that the directories and files you create are completely writeable. Maybe this is a nice thing to include with the oncoming version?
Greetings!
If you want to help beyond sending useful comments and doing tests, you can rate the class on PHP Classes, or Hotscript; you can also write a review for the class; or even donate a little bit!