On 2007-01-16 16:09:28 -0800, "Rik" <luiheidsgoeroe@hotmail.comsaid:
Quote:
Does /usr/tmp exists?
I think so it showed up in my ftp program.
Quote:
Is /usr/tmp writable? What permissions do you have exactly?
yes 0777
Quote:
Does the 'empty' file get uploaded to that location now?
Yup, I just tested it. It returns:
Upload: empty.html
Type: text/html
Size: 0 Kb
Stored in: /var/tmp/phpBKG7BF
Quote:
>
And why does you php_info() still say "upload_tmp_dir no value no value"?
This is a good question. I am new to php so I am not sure.
Quote:
Have you edited /usr/local/etc/php.ini or another .ini file?
usr/local/etc/php.ini
/////////////////////////////////////////////////////////////////
I see now the permissions did not change, sorry, let me try again and I
will get back to you pronto:
/////////////////////////////////////////////////////////////
Quote:
>
If that's all OK, what happens if you try to make a file with php itself in
/usr/tmp? Any errors?
>
And last but not least: what's the code you use?
<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.
$uploaddir = '/usr/home/arthur/public_html/game/test/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>