|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39156 file_uploads option in windows registry not working
Submitted: 2006-10-14 03:37 UTC Modified: 2007-05-31 01:00 UTC
Avg. Score:4.9 ± 0.3
Reproduced:10 of 11 (90.9%)
Same Version:8 (80.0%)
Same OS:10 (100.0%)
From: mb at smartftp dot com Assigned:
Status: No Feedback Package: PHP options/info functions
PHP Version: 5CVS-2006-10-14 (snap) OS: Windows 2003
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-10-14 03:37 UTC] mb at smartftp dot com
I'm running PHP as a CGI on Apache 2.2 on Windows 2003. 

In the php.ini file_uploads is set to On:
file_uploads = On

In the registry the following values are set:

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\Per Directory Values\c\home\htdocs]

The test.php file (see Reproduce code) is located in the following folder:

The ini_get("file_uploads") reports the correct value (0) but file uploads are still working. Also phpinfo() reports the correct local and master values.

The same problem happens file_uploads are set to Off in the php.ini and the file_uploads variable is set to "1" or "On" in the windows registry. In this case uploads won't work.

Mathias Berchtold <>

Reproduce code:
Use the following code and upload a file and watch the result.

		print("_FILES is empty.<br>"); 

	$bResult = ini_get("file_uploads");
	print("ini_get(\"file_uploads\") = ".$bResult);
	 <form enctype="multipart/form-data" method=POST>
	 	<input type=file name="file"> 
	 	<input type="submit">


Expected result:
Case A:
With the following pre-conditions:
file_uploads = On
Windows Registry
file_uploads = "0"

I expect the $_FILES variable to empty.

Case B:
With the following pre-conditions:
file_uploads = Off
Windows Registry
file_uploads = "1"

I expect the $_FILES variable not to be empty.

Actual result:
File uploads solely depend on the file_uploads value in php.ini. The windows registry seems to override this setting but in reality it doesn't affect uploads.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-31 21:03 UTC]
Please try using this CVS snapshot:
For Windows:

 [2007-01-01 01:09 UTC] mb at smartftp dot com
Thank you but it's still the same problem as before.
Tested with the latest snapshot of today.

 [2007-05-23 22:59 UTC]
What exactly do you get as output of your example script?
 [2007-05-31 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 19:01:33 2024 UTC