tags:

views:

90

answers:

2

Literally, I am unable to upload anything to my server via the normal HTML file input type. Ok, Here's my setup.

-Ubuntu 9.10

-LAMP configuration

-File upload limit set to 50 mb in the php.ini file

-All the files that I try to upload are less than a meg a piece.

-I am using the standard HTML <input type='file' name='userfile' size='20' />, and the form has the correct EncType setting.

What I'm asking about is if there is setting somewhere that I'm missing that is throwing errors, or some such thing. I've checked permissions as well. www-data is in complete control, and there doesn't seem to be a problem at all, along those lines.

Thanks in advance.

[EDIT] Fixee link: http://www.fixee.org/paste/p3jfr1b/

+1  A: 

do_upload() method accepts the name of the field not the value of the field as it's argument. Just use ->do_upload ( 'userfile' ) and it should work.

Also the INPUT field does not have a enctype attribute, the form does.

See this for more info on uploading files with CodeIgniter.

Jan Hančič
hmm, give me a sec. I like where this answer is going.
lucha libre
UNBELIEVEABLE! YOU DID IT!!!!!!!!!!!!!!!!!!!!!! WOOOHOOOOO!
lucha libre
THX SO MUCH! I'm such an idiot for missing that.
lucha libre
no problem ;) just read the documentation next time and save yourself to trouble of asking a question :)
Jan Hančič
A: 

Looking at the line: if (!$this->upload->do_upload($_POST["userfile1"])) {

I suppose you should use $_FILES['userfile1'] instead of $_POST['userfile1']?

thephpdeveloper
I tried that. Doesn't fix it.
lucha libre