mangarevolution Posted December 12, 2004 Posted December 12, 2004 Hello everyone! I'm new here. Just moved to TCH from Omnis.crap Rock Sign anyhow, one of my scripts that use to work won't work any more. This is the line that's having the error: copy($HTTP_POST_FILES['name']['tmp_name'], "directory/file.jpg"); I also tried this with no luck: move_uploaded_file($HTTP_POST_FILES['name']['tmp_name'], "directory/file.jpg"); Can anyone help me out? I keep getting the permission denied error. It's really boggling me! Thanks in advance! Quote
TCH-RobertM Posted December 12, 2004 Posted December 12, 2004 First thing is did you make sure that the directory you are uploading to has the permissions set to 777 Chmod 777 is read write and execute permissions and is needed if users are to upload files. here is a link that I was having problems with as well upload files discussion Quote
TCH-Bruce Posted December 12, 2004 Posted December 12, 2004 Welcome to the family, mangarevolution! That is correct. The folder you are uploading to must have 777 permissions for you to write your files. Quote
jnull Posted December 12, 2004 Posted December 12, 2004 Check out this link ... it might help: http://www.reducedcomplexity.com/scripts/u..._class/?lang=en Quote
mangarevolution Posted December 12, 2004 Author Posted December 12, 2004 alright!!!! Thanks!!! Rock Sign Rock Sign Rock Sign That absolutely worked! I simply changed the permissions and everything worked perfectly. Thanks a lot for taking the time to help me guys, I really appreciate it. It's so great to have a support forum like this. And thank you for the warm welcome TCH-Bruce. I'm gonna love it here. Quote
TCH-Thomas Posted December 14, 2004 Posted December 14, 2004 Welcome to your extended family mangarevolution Quote
TCH-Rob Posted December 14, 2004 Posted December 14, 2004 mangarevolution, Welcome to the forums and welcome to the family. Quote
TCH-Don Posted December 14, 2004 Posted December 14, 2004 Welcome to the Family and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote
borfast Posted December 14, 2004 Posted December 14, 2004 By the way, $HTTP_POST_FILES is deprecated, you should use $_POST instead Quote
mangarevolution Posted December 16, 2004 Author Posted December 16, 2004 Thanks for the kind welcomes everyone. I'm really loveing it here. You all know how to make a person feel welcome. By the way, $HTTP_POST_FILES is deprecated, you should use $_POST instead Raul, do you (or anyone else) know when this deprication will be fully implemented? I've got a lot of code to update, and want to know how urgent it might be. come to think of it, my cookie arrays haven't been working either. I bet they changed that as well. maybe it's just $_COOKIE now? haha. Guess I'll check on that. Quote
mangarevolution Posted December 16, 2004 Author Posted December 16, 2004 thanks! I'm gonna start replacing that right now. darn I hope it works... Quote
borfast Posted December 17, 2004 Posted December 17, 2004 I have no idea when it will be fully implemented. I'd say it will work throughout all the 4.x series, or at least through the 4.3.x series. Does anyone know if PHP 5 still supports the old style global variables, like $HTTP_SERVER_VARS? Anyway, you could use some kind of editor or even a tool made specifically for this, to search and replace each and every $HTTP_SERVER_VARS by $_SERVER, etc Quote
surefire Posted December 20, 2004 Posted December 20, 2004 Raul, I think the variable they should be using is $_FILES From php website: $_FILES Variables provided to the script via HTTP post file uploads. Analogous to the old $HTTP_POST_FILES array (which is still available, but deprecated). See POST method uploads for more information. Quote
borfast Posted December 23, 2004 Posted December 23, 2004 You're right, Jack. I used server_vars as an example and then just used it again but yes, the variable they should be using is $_FILES. Thanks for noticing it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.