I made a virtual test server for myself with the following specs: Fedora 8, Apache 2.2.6, PHP 5.2.4, MySQL 5.0 .
I had made a class for uploading but after each test I got the number 6 error which stands for UPLOAD_ERR_NO_TMP_DIR. I modified the upload_tmp_dir value to /tmp, then to /var/www/tmp. It didn' t work. I modified the permissions to 777 for /var/www/tmp it still didn' t work giving the same error.
EDIT: I had tested the script on other server and it' s working.
Any ideas why is this happening?
php can' t locate the upload temporary directory
Moderator: General Moderators
Re: php can' t locate the upload temporary directory
Is there a way to output in a script, what that script things the temporary directory is? Maybe something's overwriting a setting.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: php can' t locate the upload temporary directory
What does phpinfo() say?
There are 10 types of people in this world, those who understand binary and those who don't
Re: php can' t locate the upload temporary directory
This is what the script outputs after I put print for the FILES global variable
the php.ini says:
Code: Select all
Array ( [fisierUp] => Array ( [name] => test.txt [type] => [tmp_name] => [error] => 6 [size] => 0 ) )
Failure! Upload didn' t succeeded because of error:
Code: Select all
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
file_uploads On On
post_max_size 120M 120M
upload_max_filesize 120M 120M
upload_tmp_dir /tmp /tmp