Quote from: zerreissen at Dec 12, 2012, 02:28 PMSo, it would appear that even though the newer versions of Modx is giving the ability to disable flock, it appears that the application is still using flock. I still see errors "Exclusive locks are not supported for this stream" on a site that has had flock disabled using the new variables in the latest version (./core/xpdo/xpdo.class.php: const OPT_USE_FLOCK = 'false';
)
First, you do not change the constant to a string value of false in the xPDO class to disable flock. You must add this to the config_options array as:
$config_options = array(
xPDO::OPT_USE_FLOCK => false,
);
When you do this, xPDO uses an alternative method of writing the file that does not rely on flock being reliable. However, my understanding was that the use of LOCK_EX that is triggering this error (when this is configured properly) would fail quietly when used on file_write_contents(). This can easily be worked around by adjusting the call to remove the LOCK_EX option on that call to file_write_contents(). This was already discovered, but I'm not sure it is resolving the problem completely.
Quote from: zerreissen at Dec 12, 2012, 02:28 PM
On a host such as GoDaddy, you probably won't see the file corruption because of their single node environment (we use a multi node environment).
Speaking of multi node, Modx looks to be using the process PID, which won't work reliably on our environment as the same PIDs can be re-used at the same time in our environment on the different nodes. A more reliable process might be to use the hostname/servername in conjuction with the PID.
That is helpful and again, an easy improvement that can be made to the alternative file locking code.