my PHP upload fails with an error:6
but I don't know why. I checked all the parameters which are descriped in some stackoverflow posts, but without a soulution.
As you see, I just get an error 6. All the values (TMP_DIR, SYS_TMP_DIR) are set, but it does not work.
The apache user has the permission to access /tmp
on the server.
Is there an issue I have overlooked?
require_once '../libs/firephp-core-0.4.0/lib/FirePHPCore/fb.php';
$tmp = getcwd()."/tmp";
ini_set('open_basedir', $tmp);
ini_set('upload_tmp_dir',$tmp);
ob_start();
fb($_FILES, "FILES");
fb(ini_get('open_basedir'), 'OPEN_BASEDIR');
$tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
fb($tmp_dir, "TMP_DIR");
fb(sys_get_temp_dir(), "SYS-TMP-DIR");
$uploaddir = getcwd()."/uploads/";
$uploadfile = $uploaddir . basename.basename($_FILES['x0']['name']);
fb($uploadfile, 'FILE PATH');
fb(move_uploaded_file($_FILES['x0']['tmp_name'], $uploadfile), "MOVE RESULT");