More problems. :(
If I add in mysite/_config.php:
File:: $ apply_restrictions_to_admin = false;
and try to upload an image through the CMS. It produces the following error:
[User Error] Folder::addUploadToFolder: Couldn't copy '/var/www/vhosts/dominiox.com/httpdocs/silverstripe-cache/bar1111.jpg' to '/var/www/vhosts/dominiox.com/httpdocs/assets/Uploads/bar1111.jpg'
Line 260 in /var/www/vhosts/dominiox.com/httpdocs/sapphire/filesystem/Folder.php
I have to say that the bar1111.jpg file has been moved successfully to silverstripe-cache folder and is in it.
The problem comes when SilverStripe try to move the file from silverstripe-cache folder to assets/Uploads folder.
I think the problem is the internal check of the move_uploaded_file function, similar to the is_uploaded_file function.
The documentation says (move_uploaded_file):
This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination.
As the file (bar1111.jpg) has been moved from its original position (/temp), checking POST upload mechanism fails.
What version of SilverStripe is based the demo? http://demo.silverstripe.org
There, CMS Files & Images section is working properly.
Am I doing something wrong? :(
Please, if someone knows a solution for this.....