I have a Unix Solaris server with multiple user accounts. I have a basic a html code
Code: Select all
<HTML>
<BODY>
<form enctype="multipart/form-data" action="testupload.php" method="POST">
<input type="hidden" Name="MAX_FILE_SIZE" value="300000" />
<input name="imgfile" Type="file" size="28" />
<input type="SUBMIT" value="Upload" class="h11" />
</form>
</BODY>
</HTML>Code: Select all
<?php
print_r($_FILES);
?>When I test the same script from the other user account (corresponding to /home/user2/www/upload.html) the script does not work. I get the following output
Code: Select all
Array
(
[imgfile] => Array
(
[name] => winampmb.htm
[type] =>
[tmp_name] =>
[error] => 6
[size] => 0
)
)I read through the php manual and there it explains that if the tmp upload directory is not defined in php.ini then php uses the default system directory. To make sure that there is a default system php dir I run the script from user1 and I find out that [imgfile][name] = /tmp/tmpname which means that the system temp upload directory is defined as /tmp. I also checked the permission of /tmp and they are drwxrwxrwt which I means that everybody should have write access to it, both "user1" and "user2" and "nobody"
I have spent a lot of time into this but I could not figure out a way to make the php upload work for user2. Can anybody give me some advice on what to look next? Is this possibly a PHP bug?
Thank you in advance,
Nikolaos