By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,420 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

File Upload Problem - nothing in /tmp

P: n/a
My PHP.ini file sets the following:

file_uploads = on
upload_max_filesize = 3M
upload_tmp_dir = /tmp

When I try and upload the file, it doesn't appears in /tmp.

The name of the Submit button is userFile. On the processing page, I
echo $userFile and it gives "/tmp/phpjXJ1ZK". However, the following
code does nothing:

copy($userfile,
"/www/servers/guinfit/uploads/".$HTTP_POST_FILES['userfile']['name']);

Can anyone think of anything that might be wrong? It works under one
Linux installation, but not in the other. The php.ini upload settings
are exactly the same, and chmodding the /tmp/ to 777(!) doesn't work, so
I don't think it's a permissions problem.

Thanks in advance for any replies!!!

Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Leigh Riley wrote:
My PHP.ini file sets the following:

file_uploads = on
upload_max_filesize = 3M
upload_tmp_dir = /tmp

When I try and upload the file, it doesn't appears in /tmp.

The name of the Submit button is userFile. On the processing page, I
echo $userFile and it gives "/tmp/phpjXJ1ZK". However, the following
code does nothing:

copy($userfile,
"/www/servers/guinfit/uploads/".$HTTP_POST_FILES['userfile']['name']);

Can anyone think of anything that might be wrong? It works under one
Linux installation, but not in the other. The php.ini upload settings
are exactly the same, and chmodding the /tmp/ to 777(!) doesn't work, so
I don't think it's a permissions problem.

Thanks in advance for any replies!!!


Makde sure you have:

<form ENCTYPE="multipart/form-data">

Then access the temp file name with:

$_FILES['userFlie']['tmp_name']
--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.