cancel
Showing results for 
Search instead for 
Did you mean: 

$_FILES['file']['tmp_name'] is this /tmp again

Tonyr
Newbie
Posts: 8
Registered: ‎31-03-2010

$_FILES['file']['tmp_name'] is this /tmp again

My web site has worked fine up until very recenty. The problem is when users upload pictures the script passes but the upload doesnt work. The line at fault is the one with $_FILES['file']['tmp_name'] in it.
Without this I can not copy the uploaded file from the temp area to somewhere I can deal woth perminantly. I guess this should be from the /tmp dir. So one question I have is has anything changed in the last week or so to prevent the above working. When the script runs the line returns an empty string.
// The Upload Part
if ($error_FILE != 1)
{
// echo $_FILES['file']['tmp_name'];
if(is_uploaded_file($_FILES['file']['tmp_name']))
{
Anybody having the same problem or even better resolved it?
2 REPLIES 2
Tonyr
Newbie
Posts: 8
Registered: ‎31-03-2010

Re: $_FILES['file']['tmp_name'] is this /tmp again

Yes it is the /tmp fu;ll problem again.A
I installed a php.ini file in the root of the web and added a dierctory for the uploads and this has cleared it.
A copy of the default php.ini file is available from Gabe.<a href="http://community.plus.net/forum/index.php/topic,83568.msg696223.html#msg696223">Click Here</a>
Tony
7up
Community Veteran
Posts: 15,828
Thanks: 1,583
Fixes: 17
Registered: ‎01-08-2007

Re: $_FILES['file']['tmp_name'] is this /tmp again

I hate the is_uploaded_file() function anyway. Along with move_uploaded_file they're the two most troublesome functions I've ever had to deal with. The script will work fine on one apache server but then do nothing on another. I always use dynamic file paths (ie using getcwd()) so it shouldn't be a problem with that but it always turns out to be some stupid file system permissions error. It drives me mad because one system might be ok with the lowest possible permission while another will only work with 755 or 777 for some idiotic reason.
PN aren't directly in the webhosting game, I think they only offer their hosting as a legacy service to older customers so support is never going to be great unfortunately.
I need a new signature... i'm bored of the old one!