please fix existing mkdir error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamie
    Member
    • Aug 2025
    • 36

    #1

    please fix existing mkdir error

    this one is triggering a php error for me and breaking the front end

    no i don't want to turn down php loging on a development server its needed


    <b>Warning</b>: mkdir(): File exists in <b>/var/www/html/application/Espo/Core/Utils/File/Manager.php</b> on line <b>519</b><br />

    thanks
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9339

    #2
    If it's a race condition that two concurrent processes run the same code creating the dir simultaneously, then I'm not sure how to fix since error suppression is not available in PHP. Maybe you know how to fix.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9339

      #3
      Maybe such a fix will help. But requires testing.

      Code:
      set_error_handler(fn() => {});
      $result = mkdir($path, $permission);
      restore_error_handler();
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment


      • yuri
        yuri commented
        Editing a comment
        The downside of this fix is that true permission errors won't be logged.
    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9339

      #4
      Now I think I understand. You enabled PHP error printing somehow.

      Then, your initial post should have been like this:

      I have enabled PHP error printing for development purposes. After this, sometimes the following PHP warning breaks the frontend:

      <b>Warning</b>: mkdir(): File exists in <b>/var/www/html/application/Espo/Core/Utils/File/Manager.php</b> on line <b>519</b><br />
      What changed:
      • Provided prerequisites.
      • Sentences start with a capital letters.
      • Dots used in the end of sentences.
      • No blunt language like, "no i don't want...", is used.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...