Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-10-2006, 07:54 AM   #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?
Kulag is offline   Reply With Quote
Old 02-10-2006, 09:55 AM   #2
Come in Ray...
 
faulkner132's Avatar
 
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.
faulkner132 is offline   Reply With Quote
Old 02-10-2006, 02:06 PM   #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.
Kulag is offline   Reply With Quote
Old 02-10-2006, 02:10 PM   #4
Come in Ray...
 
faulkner132's Avatar
 
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?
faulkner132 is offline   Reply With Quote
Old 02-13-2006, 06:43 AM   #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?
Kulag is offline   Reply With Quote
Old 02-13-2006, 08:05 AM   #6
Come in Ray...
 
faulkner132's Avatar
 
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.
faulkner132 is offline   Reply With Quote
Old 02-15-2006, 05:56 AM   #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.
Kulag is offline   Reply With Quote
Old 02-15-2006, 08:17 AM   #8
Come in Ray...
 
faulkner132's Avatar
 
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.
faulkner132 is offline   Reply With Quote
Old 02-20-2006, 05:38 AM   #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.
Attached Images
File Type: png Screen.png (20.9 KB, 38 views)
Kulag is offline   Reply With Quote
Old 02-22-2006, 11:36 AM   #10
Come in Ray...
 
faulkner132's Avatar
 
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.
faulkner132 is offline   Reply With Quote
Old 02-23-2006, 01:15 PM   #11
Member (7 bit)
 
Join Date: Sep 2004
Posts: 109
The everyone group has full control, still no file in the temp folder though.
Kulag is offline   Reply With Quote
Old 02-28-2006, 06:33 AM   #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?
Kulag is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:04 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2