473,387 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

File Upload Problem - nothing in /tmp

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
1 6071
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
0
by: Benjamin Bittner | last post by:
Hallo NG, ive searched a lot in some google groups, and found many threads, but nothing that helped me. Here is the scenario: I have an aspx page which loads a user control in page.onInit like...
1
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp"...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
9
by: saldandm | last post by:
I think this is probably some minor oversight on my end but I'm just missing it. I have a multipart/form-data form in a ASP page. Inside the form I have traditional text fields and a upload field...
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.