#40606 [NEW]: umask is not being restored when each request is finished. no fixed bug #36630

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

  1. #1

    Default #40606 [NEW]: umask is not being restored when each request is finished. no fixed bug #36630

    From: support at nethost dot cz
    Operating system: unix-gentoo
    PHP version: 5.2.1
    PHP Bug Type: *Directory/Filesystem functions
    Bug description: umask is not being restored when each request is finished. no fixed bug #36630

    Description:
    ------------
    >> Bug #36630 umask is not being restored when each equest is finished.
    see for details in bug #36630.

    this bug not fixed successfully, in file.c is bug in
    if (BG(umask) != -1) {
    BG(umask) = oldumask;
    }
    instead
    if (BG(umask) == -1) { /* yes == , no != */
    BG(umask) = oldumask;
    }
    it fixes, but for clean code i move initializing
    BG(umask) = -1; from basic_globals_ctor to PHP_RINIT_FUNCTION(basic)
    (finalizing is in PHP_RSHUTDOWN_FUNCTION(basic))

    this bug is only for sapi apache2 handler-module (apache1 has workaround
    in sapi code). Or may implement same workaround in apache2 handler
    module.

    i try daily snapshot, and last version, all is bad fixed. after fixing all
    is ok for testing code
    <?=echo sprintf("%04o",umask(0111));?>



    Reproduce code:
    ---------------
    <?=echo sprintf("%04o",umask(0111));?>


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

  2. Similar Questions and Discussions

    1. How I restored Flash 8 in 98SE and XP
      When I ?upgraded? to Flash version 8.0.24.0 my Flash stopped working and it was a real challenge to get everything working again. But I got...
    2. viewstate restores data but selectedItem is restored late
      I have a Web Custom Control that has a checkBoxList control added to its control collection. This checkbox list control is initially populated...
    3. umask
      Hello, I have a question aboout the umask under FreeBSD. I couldn't find what it exactly is. It is something for setting files how you set the...
    4. Help request - getting the clone stamp tool to stay fixed
      I'm new to Photoshop and have a question - I like using the clone stamp tool a lot but what I want is for the + sybol to stay fixed. I want to...
    5. Gnome-Terminal size not restored
      -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am I the only one experiencing this problem? (See report at...
  3. #2

    Default #40606 [Opn->Fbk]: umask is not being restored when each request is finished. no fixed bug #36630

    ID: 40606
    Updated by: [email]tony2001@php.net[/email]
    Reported By: support at nethost dot cz
    -Status: Open
    +Status: Feedback
    Bug Type: *Directory/Filesystem functions
    Operating System: unix-gentoo
    PHP Version: 5.2.1
    New Comment:

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.




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

    [2007-02-23 15:42:32] support at nethost dot cz

    Description:
    ------------
    >> Bug #36630 umask is not being restored when each equest is
    finished. see for details in bug #36630.

    this bug not fixed successfully, in file.c is bug in
    if (BG(umask) != -1) {
    BG(umask) = oldumask;
    }
    instead
    if (BG(umask) == -1) { /* yes == , no != */
    BG(umask) = oldumask;
    }
    it fixes, but for clean code i move initializing
    BG(umask) = -1; from basic_globals_ctor to PHP_RINIT_FUNCTION(basic)
    (finalizing is in PHP_RSHUTDOWN_FUNCTION(basic))

    this bug is only for sapi apache2 handler-module (apache1 has
    workaround in sapi code). Or may implement same workaround in apache2
    handler module.

    i try daily snapshot, and last version, all is bad fixed. after fixing
    all is ok for testing code
    <?=echo sprintf("%04o",umask(0111));?>



    Reproduce code:
    ---------------
    <?=echo sprintf("%04o",umask(0111));?>



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


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

  4. #3

    Default #40606 [Fbk->Opn]: umask is not being restored when each request is finished. no fixed bug #36630

    ID: 40606
    User updated by: support at nethost dot cz
    Reported By: support at nethost dot cz
    -Status: Feedback
    +Status: Open
    Bug Type: *Directory/Filesystem functions
    Operating System: unix-gentoo
    PHP Version: 5.2.1
    New Comment:

    code is same as for bug 36630, as below, simple, but functional,
    <?=echo sprintf("%04o",umask(0111));?>
    expected result is (with default umask 070)
    0070
    0070
    0070
    and not
    0070
    0070
    0070
    0111
    0070
    0111 - there is used same process


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

    [2007-02-23 15:54:01] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2007-02-23 15:42:32] support at nethost dot cz

    Description:
    ------------
    >> Bug #36630 umask is not being restored when each equest is
    finished. see for details in bug #36630.

    this bug not fixed successfully, in file.c is bug in
    if (BG(umask) != -1) {
    BG(umask) = oldumask;
    }
    instead
    if (BG(umask) == -1) { /* yes == , no != */
    BG(umask) = oldumask;
    }
    it fixes, but for clean code i move initializing
    BG(umask) = -1; from basic_globals_ctor to PHP_RINIT_FUNCTION(basic)
    (finalizing is in PHP_RSHUTDOWN_FUNCTION(basic))

    this bug is only for sapi apache2 handler-module (apache1 has
    workaround in sapi code). Or may implement same workaround in apache2
    handler module.

    i try daily snapshot, and last version, all is bad fixed. after fixing
    all is ok for testing code
    <?=echo sprintf("%04o",umask(0111));?>



    Reproduce code:
    ---------------
    <?=echo sprintf("%04o",umask(0111));?>



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40606&edit=1[/url]
    support at nethost dot cz Guest

  5. #4

    Default #40606 [Opn->Csd]: umask is not being restored when each request is finished. no fixed bug #36630

    ID: 40606
    Updated by: [email]tony2001@php.net[/email]
    Reported By: support at nethost dot cz
    -Status: Open
    +Status: Closed
    Bug Type: *Directory/Filesystem functions
    Operating System: unix-gentoo
    PHP Version: 5.2.1
    New Comment:

    This bug has been fixed in CVS.

    Snapshots of the sources are packaged every three hours; this change
    will be in the next snapshot. You can grab the snapshot at
    [url]http://snaps.php.net/[/url].

    Thank you for the report, and for helping us make PHP better.




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

    [2007-02-23 15:57:57] support at nethost dot cz

    code is same as for bug 36630, as below, simple, but functional,
    <?=echo sprintf("%04o",umask(0111));?>
    expected result is (with default umask 070)
    0070
    0070
    0070
    and not
    0070
    0070
    0070
    0111
    0070
    0111 - there is used same process

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

    [2007-02-23 15:54:01] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2007-02-23 15:42:32] support at nethost dot cz

    Description:
    ------------
    >> Bug #36630 umask is not being restored when each equest is
    finished. see for details in bug #36630.

    this bug not fixed successfully, in file.c is bug in
    if (BG(umask) != -1) {
    BG(umask) = oldumask;
    }
    instead
    if (BG(umask) == -1) { /* yes == , no != */
    BG(umask) = oldumask;
    }
    it fixes, but for clean code i move initializing
    BG(umask) = -1; from basic_globals_ctor to PHP_RINIT_FUNCTION(basic)
    (finalizing is in PHP_RSHUTDOWN_FUNCTION(basic))

    this bug is only for sapi apache2 handler-module (apache1 has
    workaround in sapi code). Or may implement same workaround in apache2
    handler module.

    i try daily snapshot, and last version, all is bad fixed. after fixing
    all is ok for testing code
    <?=echo sprintf("%04o",umask(0111));?>



    Reproduce code:
    ---------------
    <?=echo sprintf("%04o",umask(0111));?>



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40606&edit=1[/url]
    tony2001@php.net 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