#39156 [NEW]: file_uploads option in windows registry not working

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #39156 [NEW]: file_uploads option in windows registry not working

    From: mb at smartftp dot com
    Operating system: Windows 2003
    PHP version: 5CVS-2006-10-14 (snap)
    PHP Bug Type: PHP options/info functions
    Bug description: file_uploads option in windows registry not working

    Description:
    ------------
    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]
    "file_uploads"="0"
    or
    "file_uploads"="Off"

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

    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 <mb@smartftp.com>

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

    test.php
    <html>
    <body>
    <?php
    if(empty($_FILES))
    print("_FILES is empty.<br>");
    else
    print_r($_FILES);
    print("<br>");

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

    <?php
    phpinfo();
    ?>

    </body>
    </html>

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

    I expect the $_FILES variable to empty.

    Case B:
    With the following pre-conditions:
    php.ini
    file_uploads = Off
    and
    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.

    --
    Edit bug report at [url]http://bugs.php.net/?id=39156&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39156&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39156&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39156&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39156&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=39156&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=39156&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39156&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=39156&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=39156&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=39156&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=39156&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=39156&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=39156&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39156&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=39156&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=39156&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39156&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=39156&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39156&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39156&r=mysqlcfg[/url]
    mb at smartftp dot com Guest

  2. Similar Questions and Discussions

    1. env Config option and LockDetect option not working with Berkeley DB RPC
      I am currently using Berkeley DB 4.4.20 with Berkeley DB perl module 0.28. I am running the client/server version of Berkeley DB. Here is what my...
    2. How to read the windows registry?
      I can successfully open the 'WScript.Shell' COM object but cannot seem to access the 'HKEY_CURRENT_CONFIG' root system. I am trying to read the...
    3. working with registry (kglad & others)
      I'm new to ActionScript and am on a task to make the swf file run on a machine for x no. of times after which it should ask for authentication. I've...
    4. Windows XP registry hacks
      Scott wrote: On a large deployment, I'd suggest using a GPO. Specifically, User Configuration --> Administrative Settings ----> Control...
    5. Auditing Windows XP Registry
      Hello There, I can audit any of the Root Keys execpt for HKEY CLASSES ROOT. Would anyone know why the Audit pane for this root ker is greyed...
  3. #2

    Default #39156 [Opn->Fbk]: file_uploads option in windows registry not working

    ID: 39156
    Updated by: [email]iliaa@php.net[/email]
    Reported By: mb at smartftp dot com
    -Status: Open
    +Status: Feedback
    Bug Type: PHP options/info functions
    Operating System: Windows 2003
    PHP Version: 5CVS-2006-10-14 (snap)
    New Comment:

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]




    Previous Comments:
    ------------------------------------------------------------------------

    [2006-10-14 03:37:01] mb at smartftp dot com

    Description:
    ------------
    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]
    "file_uploads"="0"
    or
    "file_uploads"="Off"

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

    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 <mb@smartftp.com>

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

    test.php
    <html>
    <body>
    <?php
    if(empty($_FILES))
    print("_FILES is empty.<br>");
    else
    print_r($_FILES);
    print("<br>");

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

    <?php
    phpinfo();
    ?>

    </body>
    </html>

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

    I expect the $_FILES variable to empty.

    Case B:
    With the following pre-conditions:
    php.ini
    file_uploads = Off
    and
    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.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39156&edit=1[/url]
    iliaa@php.net Guest

  4. #3

    Default #39156 [Fbk->Opn]: file_uploads option in windows registry not working

    ID: 39156
    User updated by: mb at smartftp dot com
    Reported By: mb at smartftp dot com
    -Status: Feedback
    +Status: Open
    Bug Type: PHP options/info functions
    Operating System: Windows 2003
    PHP Version: 5CVS-2006-10-14 (snap)
    New Comment:

    Thank you but it's still the same problem as before.
    Tested with the latest snapshot of today.
    php5.2-win32-200612312330.zip

    -Mat


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-31 21:03:17] [email]iliaa@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2006-10-14 03:37:01] mb at smartftp dot com

    Description:
    ------------
    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]
    "file_uploads"="0"
    or
    "file_uploads"="Off"

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

    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 <mb@smartftp.com>

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

    test.php
    <html>
    <body>
    <?php
    if(empty($_FILES))
    print("_FILES is empty.<br>");
    else
    print_r($_FILES);
    print("<br>");

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

    <?php
    phpinfo();
    ?>

    </body>
    </html>

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

    I expect the $_FILES variable to empty.

    Case B:
    With the following pre-conditions:
    php.ini
    file_uploads = Off
    and
    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.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39156&edit=1[/url]
    mb at smartftp dot com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139