Manual:Disabling file lock manager

In some setups, when uploading a file, an error appears stating. This error is usually caused by an incorrect configuration of $wgUploadDirectory, by a lack of permissions to write on that directory, or a SELinux or suPHP misconfiguration. In such cases, disabling the lock file manager will prevent the Could not acquire lock error, but you will get another error when the file is actually saved.

In cases where the lock manager is the problem (maybe a filesystem that has some issues with it) there's a way to override the current filesystem lock manager with a null lock manager.

You can do that by putting this code in LocalSettings.php: