[wp-trac] [WordPress Trac] #38595: Unable to access wp-admin/options-permalink.php when .htaccess file is on NFS

WordPress Trac noreply at wordpress.org
Mon Oct 31 19:03:16 UTC 2016

#38595: Unable to access wp-admin/options-permalink.php when .htaccess file is on
 Reporter:  kicwordpress  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
 After nearly a week of troubleshooting, we have identified an issue with
 wordpress which is preventing us from storing our .htaccess file on an NFS

 This issue exists as far back as 4.4

 In order to reproduce:

 install wordpress in a directory where .htaccess is located on a mounted
 nfs share. Once wordpress is installed, navigate to yoursite.com/wp-admin
 /options-permalink.php - the page should fail to load.

 This issue appears to be caused by the function "flock();" in the function
 "insert_with_markers();" in wp-admin/includes/misc.php

 Per PHPs documentation, flock(); is only acceptable for use on local

 I found an existing ticket regarding this function - #31767 - if I
 understand correctly, flock(); was added to the "insert_with_markers();
 function to resolve a concurrent write issue on shared filesystems.

 Disclaimer: I am not a PHP developer, and only understand the basic
 concepts. The testing for the above bug consisted of commenting out
 functions till I could find the source of the issue. Commenting out the
 "flock();" function in the "insert_with_markers();" function resolved the
 issue in our environment.

Ticket URL: <https://core.trac.wordpress.org/ticket/38595>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list