|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-06 07:53 UTC] paj at pearfr dot org
tempnam() creates a readonly file under Windows 2K using Apache 1.3.27, php as CGI. The file permissions are correct but it sets the RO flag, which is not really usefull ;) pierre PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
Can you try this patch? untested, but should work... Index: main/php_open_temporary_file.c =================================================================== RCS file: /repository/php4/main/php_open_temporary_file.c,v retrieving revision 1.25 diff -u -p -r1.25 php_open_temporary_file.c --- main/php_open_temporary_file.c 18 Mar 2003 16:40:29 -0000 1.25 +++ main/php_open_temporary_file.c 11 Apr 2003 09:09:15 -0000 @@ -132,7 +132,8 @@ static int php_do_open_temporary_file(co #ifdef PHP_WIN32 if (GetTempFileName(path, pfx, 0, opened_path)) { - fd = VCWD_OPEN(opened_path, open_flags); + VCWD_CHMOD(opened_path, 0600); + fd = VCWD_OPEN_MODE(opened_path, open_flags, 0600); } #elif defined(NETWARE) /* Using standard mktemp() implementation for NetWare */