Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP image upload

Name: Anonymous 2007-06-06 8:03 ID:bGRbOOvu

So I'm trying out this: http://lv.php.net/manual/en/features.file-upload.php

Almost as it is, just changed the upload dir to correct one and gave it 777 in chmod.

I have two files, one contains that html form the other one php code.

But instead of correct file upload I get this:
Possible file upload attack!
Here is some more debugging info:Array
(
    [userfile] => Array
        (
            [name] => 4chan.jpg
            [type] =>
            [tmp_name] =>
            [error] => 2
            [size] => 0
        )

)

Name: Anonymous 2007-06-06 8:53 ID:J8AF2/P3

>>1
Don't give chmod 777. Use chmod 600, and give ownership to the user under which the web server is ran.

Before echoing/placing the <INPUT TYPE="FILE"...> in your web page, be sure to add
<INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="XXX">
where XXX is the maximum allowable upload file size in bytes.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List