My mistake, I left a hack in civicrm.settings.php (and forgot it, it was months ago) which led to this weird behavior. Reverting the hack solves the problem :
// can't remember why I did this 18 months ago, but this is obviously a bad idea...
I had the same problem in civicrm 4.6 drupal 7.50.
I made this patch to fix the issue, i hope that will be useful.
Found the answer so I will post it here to help others. The server /tmp space filled up due to a rogue imagemagick process, so Civimail could not upload new images. This is a known issue with imagemagick - see for example this post. Deleting /tmp/magick-* files solved the problem.
KCfinder is very sensible with the path to image storage. It configured path to the storage must match the path send by the JS component exactly! It doesn't work well with symbolic links on unix.
On windows servers, there may be problems with capital letters and small letters too.
I'm not shure, if this may be the problem in this case, but just double ...
The problem was caused by the CiviMobile extension which injected script code before the original page content and before the OnLoad event for loading the JQuery library. After removing this plugin, the upload page comes up properly.
You may want to check Firewall or the settings in WPSecurity (plugin) if you have that installed. I ran into this problem and it was an option in WPSecurity for "Bad Query Strings" which blocked access to thumbnails in KCFinder.
According to the plugin... Deny Bad Query Strings
This feature will write rules in your .htaccess file to prevent
The settings_location.php file should not normally be required, but an example is described at:
The file civicrm.config.php should be able to handle bootstrap in most common configurations without settings_location.php. However, this depends on having somewhat plain/predictable ...
I don't think there's an intentional change in system requirements. However, looking at civicrm.config.php, I can see it's undergone recent changes. It looks like you're having trouble because your PHP configuration doesn't allow running the "exec" command. That's often done for security - but if you can change your configuration to allow it, I think you'...
There used to be a requirement that the URLs that Andrei referred to above could not contain symbolic links. I don't know if that is still the case, but make sure that all directories in that path are true directories and not symbolic links.