|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
File Uploading
I'm having trouble getting a handle on a file uploaded using an http form.
theo code for the input =*input type='file' name='file'> So I should be able to access it via the PHP global array $_FILES, but I get an undefined indx error. I can access the file name via the $_POST array, however this is obviously not what I want. Can someone explain what I did wrong? |
|
|
|
|
|
#2 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Double check your settings for the temp folder in the PHP ini. Also make sure the account your webserver runs as has read/write access to the temp folder path.
|
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
Uploads are on, max file size set to 2000M. The temp folder is C:/php/Temp/ and PHP is in C:/php/. I'm running Apache 2.054 via the admin account, so Apache should have full access to all directories.
|
|
|
|
|
|
#4 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
When you initiate the upload, you should immediately see a garbage file name in the temp directory. Is this the case?
|
|
|
|
|
|
#5 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
Nope, the file is small though, so could it be that since PHP didn't register that my script used the file, it deleted it?
|
|
|
|
|
|
#6 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
PHP will not delete the file automatically. There should be something in your temp directory indicating the filename. It most likely a permission issue. Apache may be running as Admin, but assign the "Everyone" group full control of the "C:/PHP/temp" directory and try it. If that works, try removing permissions until you find where the holdup is.
|
|
|
|
|
|
#7 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
How do I give a user or usergroup permissions to a folder? FYI: I use WinXP Pro.
|
|
|
|
|
|
#8 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Right click on the folder and select Sharing and Security. You don't have to set sharing, but on the Security Tab, make sure the group "Everyone" has full control. This will eliminate permissions from the equation.
|
|
|
|
|
|
#9 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
Um, sorry, I don't see any of that. I attached a pic of what I see.
|
|
|
|
|
|
#10 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
You have simple sharing enabled. Disable the option here:
Control Panel > Folder Options > View It is one of the last checkbox options. After doing this see what the security settings are. |
|
|
|
|
|
#11 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
The everyone group has full control, still no file in the temp folder though.
|
|
|
|
|
|
#12 |
|
Member (7 bit)
Join Date: Sep 2004
Posts: 109
|
This is still not working, if you don't know, can you point me to where I should go to ask?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|