by
KK » Sat Mar 10, 2012 7:46 am
Hi,
I had a look and, as suspected, your server is running with 'safe_mode' on.
Although this feature has been deprecated as of PHP 5.3.0 and removed completely as of PHP 5.4.0., certain hosts still insist on using it.
In rough terms, running under safe_mode, any folder created by Couch would be given the ownership of the server (as opposed to the executing script) and this will prevent any further operations on the files that get created within the folders. Ergo the 'Failed to open output stream' error you were getting.
As a workaround to this problem, we'll have to lend Couch a helping hand by manually creating any folders required by it and giving the folders the requisite permissions.
The gallery module will require two folders -
1. A 'tmp' folder for temporarily holding the uploaded images
2. The final folder where the images are permanently stored.
To create the 'tmp' folder, use your FTP client and explore the uploads folder of Couch.
By default this is the 'couch/uploads' folder (if you have not chosen to change the location in 'config.php').
You should find 4 existing folders within the 'uploads' folder - 'file'. 'flash', 'image' and 'media'.
Add a fifth folder naming it 'tmp'. Set this folder's permission to 777.
Moving on to create the permanent folder.
This folder will reside within the 'couch/uploads/image' folder (all the uploaded images in Couch are stored here).
The name of this folder will be the name of the gallery template you are using i.e. if your template's name is 'gallery.php', this folder will be named 'gallery'.
In your case, the template's name was 'foto.php' so a folder named 'foto' needed to be created within 'couch/uploads/image' folder.
Set the permission to 777.
Creating these two folders should be sufficient for the uploading process to continue despite the safe_mode in operation.
P.S. I have already created the two folders for you on your site. Please check and let me know if everything is working as expected.
Thanks