Page 1 of 1

php can' t locate the upload temporary directory

Posted: Tue Jul 14, 2009 7:03 am
by Rovas
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?

Re: php can' t locate the upload temporary directory

Posted: Tue Jul 14, 2009 2:32 pm
by pickle
Is there a way to output in a script, what that script things the temporary directory is? Maybe something's overwriting a setting.

Re: php can' t locate the upload temporary directory

Posted: Tue Jul 14, 2009 2:38 pm
by VladSun
What does phpinfo() say?

Re: php can' t locate the upload temporary directory

Posted: Wed Jul 15, 2009 3:20 am
by Rovas
This is what the script outputs after I put print for the FILES global variable

Code: Select all

 
Array ( [fisierUp] => Array ( [name] => test.txt [type] => [tmp_name] => [error] => 6 [size] => 0 ) )
Failure! Upload didn' t succeeded because of error:
 
the php.ini says:

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