php can' t locate the upload temporary directory

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

php can' t locate the upload temporary directory

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: php can' t locate the upload temporary directory

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: php can' t locate the upload temporary directory

Post by VladSun »

What does phpinfo() say?
There are 10 types of people in this world, those who understand binary and those who don't
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: php can' t locate the upload temporary directory

Post 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
 
Post Reply