Jump to content

Recommended Posts

Posted

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!

Posted

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.

Posted

Thanks for the kind welcomes everyone. I'm really loveing it here. You all know how to make a person feel welcome. :oops:

 

By the way, $HTTP_POST_FILES is deprecated, you should use $_POST instead :lol:

 

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. :lol:

Posted

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 :notworthy:

Posted

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.

Posted

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 :clapping:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...