Interacting with a file in PHP causes second interaction to just not happen












0














This is probably going to have a simple answer, but here is my problem. I am currently writing a weak permissions filesystem, I want the user to not have to do any authentication checks if the given file is empty (this is the $filedir variable). I can successfully check if this file is empty, however, if I try to read anything else (shown by file_get_contents(data.data)), it just simply will not work. There are no errors, but the condition will always evaluate as true. I have been stuck on this forever, and I'm still new to PHP, so hopefully, someone can help me out here!



Thank you in advance!
Karl



   <?php
$filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/' . $_SESSION['user_name'] . '/a' . '/' . $_POST['dataName'];

if ($_POST['c'] == "true") {
$filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/a' . '/' . $_POST['dataName'];
}elseif ($_POST['c'] == "") {
// code...
}else {
$filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is' . '/' . $_POST['c'] . '/a' . '/' . $_POST['dataName'];
}

**//THIS IS THE FIRST CONDITION THAT, WHEN IMPLEMENTED, CAUSES THE SECOND CONDITION TO ALWAYS EVALUATE TO TRUE FOR SOME REASON**
$pass = false;
if (readfile($filedir) == 0) {
$pass = true;
echo "check";
}else {
echo "pass";
}


if ($_POST['auth'] == "1") {

$prev = getcwd();
chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
$cue = file_get_contents("data.data");
// throw new Exception("Incorrect auth token", 1);

if ($_POST['token'] == $cue) {
$_SESSION['apiauth'] == $_POST['token'];
}elseif (file_get_contents($filedir) == '') {
$_SESSION['apiauth'] == '';
}else {
throw new Exception("Incorrect auth token", 1);
}
chdir($prev);



}elseif ($_POST['permissions'] == true) {


addLog($fn,'Permissions were changed', 'DATABASE-PERMISSIONS', null, null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
if ($_POST['revoke'] == true && ($_POST['user'] != 'u' || ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm' || $_POST['user'] == null))) {
throw new Exception("Cannot revoke access without proper format", 1);
}

$prev = getcwd();
chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
$cue = file_get_contents("data.data");


**//BELOW THIS IS THE SECOND CONDITION THAT FAILS IF THE FIRST CONDITION IS IMPLEMENTED, AND WORKS FINE IF ITS LEFT OUT**
if ($cue === $_POST['token'] || $cue === $_SESSION['apiauth'] || $pass) {
if ($_POST['type'] == 'r') {


chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/a/dir/path');
if ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm') {
$cue = fopen($_POST['dataName'].".data", "w");
fwrite($cue, '**'.$_POST['user'].'**');
fclose($cue);
}elseif ($_POST['user'] == 'u') {
$d = file_get_contents($_POST['dataName'].".secure");

if ($d == '**a**' || $d == '**e**' || $d == '**m**') {
$cue = fopen($_POST['dataName'].".data", "w");
fwrite($cue, '');
fclose($cue);
}
if ($_POST['revoke'] == true) {
$writein = str_replace($_POST['name']."||","",file_get_contents($_POST['dataName'].".secure"));
$cue = fopen($_POST['dataName'].".data", "w");
fwrite($cue, $writein);
fclose($cue);
}else {
if (strpos(file_get_contents($_POST['dataName'].".secure"), $_POST['name']) !== false) {
// throw new Exception("User already exists in permission slot", 1);
}else{
$cue = fopen($_POST['dataName'].".data", "a");
fwrite($cue, $_POST['name'].'||');
fclose($cue);
}
}

}else {
throw new Exception("Invalid parameter.", 1);
}


}
}else {
addLog($fn,'Permission changed was blocked due to incorrect token', 'DATABASE-PERMISSIONS', 'danger', null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
throw new Exception("Incorrect auth token", 1);
}
chdir($prev);
}


?>










share|improve this question



























    0














    This is probably going to have a simple answer, but here is my problem. I am currently writing a weak permissions filesystem, I want the user to not have to do any authentication checks if the given file is empty (this is the $filedir variable). I can successfully check if this file is empty, however, if I try to read anything else (shown by file_get_contents(data.data)), it just simply will not work. There are no errors, but the condition will always evaluate as true. I have been stuck on this forever, and I'm still new to PHP, so hopefully, someone can help me out here!



    Thank you in advance!
    Karl



       <?php
    $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/' . $_SESSION['user_name'] . '/a' . '/' . $_POST['dataName'];

    if ($_POST['c'] == "true") {
    $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/a' . '/' . $_POST['dataName'];
    }elseif ($_POST['c'] == "") {
    // code...
    }else {
    $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is' . '/' . $_POST['c'] . '/a' . '/' . $_POST['dataName'];
    }

    **//THIS IS THE FIRST CONDITION THAT, WHEN IMPLEMENTED, CAUSES THE SECOND CONDITION TO ALWAYS EVALUATE TO TRUE FOR SOME REASON**
    $pass = false;
    if (readfile($filedir) == 0) {
    $pass = true;
    echo "check";
    }else {
    echo "pass";
    }


    if ($_POST['auth'] == "1") {

    $prev = getcwd();
    chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
    $cue = file_get_contents("data.data");
    // throw new Exception("Incorrect auth token", 1);

    if ($_POST['token'] == $cue) {
    $_SESSION['apiauth'] == $_POST['token'];
    }elseif (file_get_contents($filedir) == '') {
    $_SESSION['apiauth'] == '';
    }else {
    throw new Exception("Incorrect auth token", 1);
    }
    chdir($prev);



    }elseif ($_POST['permissions'] == true) {


    addLog($fn,'Permissions were changed', 'DATABASE-PERMISSIONS', null, null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
    if ($_POST['revoke'] == true && ($_POST['user'] != 'u' || ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm' || $_POST['user'] == null))) {
    throw new Exception("Cannot revoke access without proper format", 1);
    }

    $prev = getcwd();
    chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
    $cue = file_get_contents("data.data");


    **//BELOW THIS IS THE SECOND CONDITION THAT FAILS IF THE FIRST CONDITION IS IMPLEMENTED, AND WORKS FINE IF ITS LEFT OUT**
    if ($cue === $_POST['token'] || $cue === $_SESSION['apiauth'] || $pass) {
    if ($_POST['type'] == 'r') {


    chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/a/dir/path');
    if ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm') {
    $cue = fopen($_POST['dataName'].".data", "w");
    fwrite($cue, '**'.$_POST['user'].'**');
    fclose($cue);
    }elseif ($_POST['user'] == 'u') {
    $d = file_get_contents($_POST['dataName'].".secure");

    if ($d == '**a**' || $d == '**e**' || $d == '**m**') {
    $cue = fopen($_POST['dataName'].".data", "w");
    fwrite($cue, '');
    fclose($cue);
    }
    if ($_POST['revoke'] == true) {
    $writein = str_replace($_POST['name']."||","",file_get_contents($_POST['dataName'].".secure"));
    $cue = fopen($_POST['dataName'].".data", "w");
    fwrite($cue, $writein);
    fclose($cue);
    }else {
    if (strpos(file_get_contents($_POST['dataName'].".secure"), $_POST['name']) !== false) {
    // throw new Exception("User already exists in permission slot", 1);
    }else{
    $cue = fopen($_POST['dataName'].".data", "a");
    fwrite($cue, $_POST['name'].'||');
    fclose($cue);
    }
    }

    }else {
    throw new Exception("Invalid parameter.", 1);
    }


    }
    }else {
    addLog($fn,'Permission changed was blocked due to incorrect token', 'DATABASE-PERMISSIONS', 'danger', null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
    throw new Exception("Incorrect auth token", 1);
    }
    chdir($prev);
    }


    ?>










    share|improve this question

























      0












      0








      0


      0





      This is probably going to have a simple answer, but here is my problem. I am currently writing a weak permissions filesystem, I want the user to not have to do any authentication checks if the given file is empty (this is the $filedir variable). I can successfully check if this file is empty, however, if I try to read anything else (shown by file_get_contents(data.data)), it just simply will not work. There are no errors, but the condition will always evaluate as true. I have been stuck on this forever, and I'm still new to PHP, so hopefully, someone can help me out here!



      Thank you in advance!
      Karl



         <?php
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/' . $_SESSION['user_name'] . '/a' . '/' . $_POST['dataName'];

      if ($_POST['c'] == "true") {
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/a' . '/' . $_POST['dataName'];
      }elseif ($_POST['c'] == "") {
      // code...
      }else {
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is' . '/' . $_POST['c'] . '/a' . '/' . $_POST['dataName'];
      }

      **//THIS IS THE FIRST CONDITION THAT, WHEN IMPLEMENTED, CAUSES THE SECOND CONDITION TO ALWAYS EVALUATE TO TRUE FOR SOME REASON**
      $pass = false;
      if (readfile($filedir) == 0) {
      $pass = true;
      echo "check";
      }else {
      echo "pass";
      }


      if ($_POST['auth'] == "1") {

      $prev = getcwd();
      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
      $cue = file_get_contents("data.data");
      // throw new Exception("Incorrect auth token", 1);

      if ($_POST['token'] == $cue) {
      $_SESSION['apiauth'] == $_POST['token'];
      }elseif (file_get_contents($filedir) == '') {
      $_SESSION['apiauth'] == '';
      }else {
      throw new Exception("Incorrect auth token", 1);
      }
      chdir($prev);



      }elseif ($_POST['permissions'] == true) {


      addLog($fn,'Permissions were changed', 'DATABASE-PERMISSIONS', null, null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
      if ($_POST['revoke'] == true && ($_POST['user'] != 'u' || ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm' || $_POST['user'] == null))) {
      throw new Exception("Cannot revoke access without proper format", 1);
      }

      $prev = getcwd();
      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
      $cue = file_get_contents("data.data");


      **//BELOW THIS IS THE SECOND CONDITION THAT FAILS IF THE FIRST CONDITION IS IMPLEMENTED, AND WORKS FINE IF ITS LEFT OUT**
      if ($cue === $_POST['token'] || $cue === $_SESSION['apiauth'] || $pass) {
      if ($_POST['type'] == 'r') {


      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/a/dir/path');
      if ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm') {
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, '**'.$_POST['user'].'**');
      fclose($cue);
      }elseif ($_POST['user'] == 'u') {
      $d = file_get_contents($_POST['dataName'].".secure");

      if ($d == '**a**' || $d == '**e**' || $d == '**m**') {
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, '');
      fclose($cue);
      }
      if ($_POST['revoke'] == true) {
      $writein = str_replace($_POST['name']."||","",file_get_contents($_POST['dataName'].".secure"));
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, $writein);
      fclose($cue);
      }else {
      if (strpos(file_get_contents($_POST['dataName'].".secure"), $_POST['name']) !== false) {
      // throw new Exception("User already exists in permission slot", 1);
      }else{
      $cue = fopen($_POST['dataName'].".data", "a");
      fwrite($cue, $_POST['name'].'||');
      fclose($cue);
      }
      }

      }else {
      throw new Exception("Invalid parameter.", 1);
      }


      }
      }else {
      addLog($fn,'Permission changed was blocked due to incorrect token', 'DATABASE-PERMISSIONS', 'danger', null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
      throw new Exception("Incorrect auth token", 1);
      }
      chdir($prev);
      }


      ?>










      share|improve this question













      This is probably going to have a simple answer, but here is my problem. I am currently writing a weak permissions filesystem, I want the user to not have to do any authentication checks if the given file is empty (this is the $filedir variable). I can successfully check if this file is empty, however, if I try to read anything else (shown by file_get_contents(data.data)), it just simply will not work. There are no errors, but the condition will always evaluate as true. I have been stuck on this forever, and I'm still new to PHP, so hopefully, someone can help me out here!



      Thank you in advance!
      Karl



         <?php
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/' . $_SESSION['user_name'] . '/a' . '/' . $_POST['dataName'];

      if ($_POST['c'] == "true") {
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is/a' . '/' . $_POST['dataName'];
      }elseif ($_POST['c'] == "") {
      // code...
      }else {
      $filedir = substr(getcwd(), 0, strpos(getcwd(), "this")).'this/is' . '/' . $_POST['c'] . '/a' . '/' . $_POST['dataName'];
      }

      **//THIS IS THE FIRST CONDITION THAT, WHEN IMPLEMENTED, CAUSES THE SECOND CONDITION TO ALWAYS EVALUATE TO TRUE FOR SOME REASON**
      $pass = false;
      if (readfile($filedir) == 0) {
      $pass = true;
      echo "check";
      }else {
      echo "pass";
      }


      if ($_POST['auth'] == "1") {

      $prev = getcwd();
      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
      $cue = file_get_contents("data.data");
      // throw new Exception("Incorrect auth token", 1);

      if ($_POST['token'] == $cue) {
      $_SESSION['apiauth'] == $_POST['token'];
      }elseif (file_get_contents($filedir) == '') {
      $_SESSION['apiauth'] == '';
      }else {
      throw new Exception("Incorrect auth token", 1);
      }
      chdir($prev);



      }elseif ($_POST['permissions'] == true) {


      addLog($fn,'Permissions were changed', 'DATABASE-PERMISSIONS', null, null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
      if ($_POST['revoke'] == true && ($_POST['user'] != 'u' || ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm' || $_POST['user'] == null))) {
      throw new Exception("Cannot revoke access without proper format", 1);
      }

      $prev = getcwd();
      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/adir');
      $cue = file_get_contents("data.data");


      **//BELOW THIS IS THE SECOND CONDITION THAT FAILS IF THE FIRST CONDITION IS IMPLEMENTED, AND WORKS FINE IF ITS LEFT OUT**
      if ($cue === $_POST['token'] || $cue === $_SESSION['apiauth'] || $pass) {
      if ($_POST['type'] == 'r') {


      chdir(substr(getcwd(), 0, strpos(getcwd(), "this")) . 'this/is/a/dir/path');
      if ($_POST['user'] == 'e' || $_POST['user'] == 'a' || $_POST['user'] == 'm') {
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, '**'.$_POST['user'].'**');
      fclose($cue);
      }elseif ($_POST['user'] == 'u') {
      $d = file_get_contents($_POST['dataName'].".secure");

      if ($d == '**a**' || $d == '**e**' || $d == '**m**') {
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, '');
      fclose($cue);
      }
      if ($_POST['revoke'] == true) {
      $writein = str_replace($_POST['name']."||","",file_get_contents($_POST['dataName'].".secure"));
      $cue = fopen($_POST['dataName'].".data", "w");
      fwrite($cue, $writein);
      fclose($cue);
      }else {
      if (strpos(file_get_contents($_POST['dataName'].".secure"), $_POST['name']) !== false) {
      // throw new Exception("User already exists in permission slot", 1);
      }else{
      $cue = fopen($_POST['dataName'].".data", "a");
      fwrite($cue, $_POST['name'].'||');
      fclose($cue);
      }
      }

      }else {
      throw new Exception("Invalid parameter.", 1);
      }


      }
      }else {
      addLog($fn,'Permission changed was blocked due to incorrect token', 'DATABASE-PERMISSIONS', 'danger', null, 'Target: '. $_POST['dataName'] . 'Change: {Type: '.$_POST['type'].', Usertype: '.$_POST['user'].', Name: '.$_POST['name']);
      throw new Exception("Incorrect auth token", 1);
      }
      chdir($prev);
      }


      ?>







      php filesystems






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 16:37









      Karl Schmidt

      83




      83
























          1 Answer
          1






          active

          oldest

          votes


















          0














          From the manual




          Returns the number of bytes read from the file. If an error occurs,
          FALSE is returned and unless the function was called as @readfile(),
          an error message is printed.




          You make a weak comparison on this line



          if (readfile($filedir) == 0) {

          }


          If the call fails false == 0 will evaluate to true, because the int value will evaluate to false. false == false is true. So use strict comparison operator === and try to figure out why the call fails anyway.



          if (readfile($filedir) === 0) {

          }


          or use, if intended if the call succeded, and returned anything (but also 0)



          if (readfile($filedir) !== false) {

          }





          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379055%2finteracting-with-a-file-in-php-causes-second-interaction-to-just-not-happen%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            From the manual




            Returns the number of bytes read from the file. If an error occurs,
            FALSE is returned and unless the function was called as @readfile(),
            an error message is printed.




            You make a weak comparison on this line



            if (readfile($filedir) == 0) {

            }


            If the call fails false == 0 will evaluate to true, because the int value will evaluate to false. false == false is true. So use strict comparison operator === and try to figure out why the call fails anyway.



            if (readfile($filedir) === 0) {

            }


            or use, if intended if the call succeded, and returned anything (but also 0)



            if (readfile($filedir) !== false) {

            }





            share|improve this answer


























              0














              From the manual




              Returns the number of bytes read from the file. If an error occurs,
              FALSE is returned and unless the function was called as @readfile(),
              an error message is printed.




              You make a weak comparison on this line



              if (readfile($filedir) == 0) {

              }


              If the call fails false == 0 will evaluate to true, because the int value will evaluate to false. false == false is true. So use strict comparison operator === and try to figure out why the call fails anyway.



              if (readfile($filedir) === 0) {

              }


              or use, if intended if the call succeded, and returned anything (but also 0)



              if (readfile($filedir) !== false) {

              }





              share|improve this answer
























                0












                0








                0






                From the manual




                Returns the number of bytes read from the file. If an error occurs,
                FALSE is returned and unless the function was called as @readfile(),
                an error message is printed.




                You make a weak comparison on this line



                if (readfile($filedir) == 0) {

                }


                If the call fails false == 0 will evaluate to true, because the int value will evaluate to false. false == false is true. So use strict comparison operator === and try to figure out why the call fails anyway.



                if (readfile($filedir) === 0) {

                }


                or use, if intended if the call succeded, and returned anything (but also 0)



                if (readfile($filedir) !== false) {

                }





                share|improve this answer












                From the manual




                Returns the number of bytes read from the file. If an error occurs,
                FALSE is returned and unless the function was called as @readfile(),
                an error message is printed.




                You make a weak comparison on this line



                if (readfile($filedir) == 0) {

                }


                If the call fails false == 0 will evaluate to true, because the int value will evaluate to false. false == false is true. So use strict comparison operator === and try to figure out why the call fails anyway.



                if (readfile($filedir) === 0) {

                }


                or use, if intended if the call succeded, and returned anything (but also 0)



                if (readfile($filedir) !== false) {

                }






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 '18 at 17:05









                Philipp Palmtag

                1,10921217




                1,10921217






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379055%2finteracting-with-a-file-in-php-causes-second-interaction-to-just-not-happen%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

                    Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

                    A Topological Invariant for $pi_3(U(n))$