|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-04 21:45 UTC] lbarnaud@php.net
[2008-11-04 21:53 UTC] nyaka at nyaka dot com
[2008-11-04 22:01 UTC] lbarnaud@php.net
[2008-11-04 22:19 UTC] nyaka at nyaka dot com
[2008-11-04 22:49 UTC] lbarnaud@php.net
[2008-11-05 01:34 UTC] nyaka at nyaka dot com
[2008-11-05 01:57 UTC] lbarnaud@php.net
[2008-11-05 14:38 UTC] nyaka at nyaka dot com
[2008-11-05 16:48 UTC] lbarnaud@php.net
[2008-11-05 16:55 UTC] nyaka at nyaka dot com
[2008-11-05 17:12 UTC] lbarnaud@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
Description: ------------ I'm trying to upload a file with PHP 5.2.6 and Apache 2.2.9 from a custom application. It worked for me previously with Apache 1.3 and PHP 4.3. I also tried to use PHP 5.2.7RC3-dev (cli) (built: Nov 4 2008 20:43:51). Same results. Reproduce code: --------------- <?php error_log(print_r($_FILES, TRUE)); ?> Expected result: ---------------- I expect the file to be uploaded and $_FILES array to contain correct data about that file and not an error message. Actual result: -------------- This is from the apache error log: Array ( [wav] => Array ( [name] => msg-94_48972.wav [type] => [tmp_name] => [error] => 3 [size] => 0 ) ) This is trace of httpd with truss: ....... 8469: read(23, " P O S T / v o i c e m".., 8000) = 4344 8469: stat64("/share/web/snom/voicemail.php", 0x08047880) = 0 ....... 8469: time() = 1225822869 8469: resolvepath("/tmp", "/tmp", 1024) = 4 8469: getpid() = 8469 [8463] 8469: lstat64("/tmp/phpjFaOIq", 0x08044800) Err#2 ENOENT 8469: open("/tmp/phpjFaOIq", O_RDWR|O_CREAT|O_EXCL, 0600) = 24 8469: write(24, " R I F F92 6\0\0 W A V E".., 5119) = 5119 8469: write(24, " nDCB895EA04 69A1C I n '".., 5119) = 5119 8469: read(23, " nD504 H8EE3C8 rCB\0B691".., 8000) = 2346 8469: write(24, " 2C4E215B9 aD6 <E6 J aD9".., 3779) = 3779 8469: close(24) = 0 8469: unlink("/tmp/phpjFaOIq") = 0 ....... 8469: resolvepath("/share/web/snom/voicemail.php", "/share/web/snom/voicemail.php", 1024) = 29 8469: open("/share/web/snom/voicemail.php", O_RDONLY) = 25 ....... I can see here that the temporary file is actually created and the data is written to it. But after the file is closed an unlink is executed. I can provide TCP dump if necessary.