class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I assume that your php.ini is correct if Wordpress works.
upload_tmp_dir can be empty ("no values" in a phpinfo()), in which case PHP will use the system default temp directory.
However, your dump indicates that the error code is 6, which is UPLOAD_ERR_NO_TMP_DIR: "Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3"
So there is definitively a problem with your temp folder. Try to set it explicitly in your php.ini.Reply
i tried to upload a file with the demo files included in the download package.
But i doesn't work. I receive the error message: Error: File upload error (unknown error code).
My Debug:
system information
- GD version : 2.0
- supported image types : png jpg gif bmp
- open_basedir : /var/www/htdocs/dennis/upload/:/test2/
- language : en_GB
source is an uploaded file
- source variables
file_src_name :
file_src_name_body :
file_src_name_ext :
file_src_pathname :
file_src_mime :
file_src_size : (max= 2097152)
file_src_error : 6
If you remove the open_basedir restriction on your server, does the demo work?
yes, enctype="multipart/form-data" and the max file size tag are inculded.
First i thought, that i set the wrong upload directory but i can change it to anything: same problem.
This is the var_dump $_FILES output:
array(1) { ["upload_file"]=> array(5) { ["name"]=> string(10) "Winter.jpg" ["type"]=> string(0) "" ["tmp_name"]=> string(0) "" ["error"]=> int(6) ["size"]=> int(0) } }
In my php.ini the upload_tmp_dir is set to no value - is it okay?
e.g. in Wordpress does the upload work..no problems..
upload_tmp_dir can be empty ("no values" in a phpinfo()), in which case PHP will use the system default temp directory.
However, your dump indicates that the error code is 6, which is UPLOAD_ERR_NO_TMP_DIR: "Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3"
So there is definitively a problem with your temp folder. Try to set it explicitly in your php.ini.