Question: Does any image_gallery process or related process need access to any other filesystem location other than any /assets/image_gallery album folder it creates?
Good question. In theory, no, it shouldn't, but I'm a little unclear on how the file upload process works in Silverstripe. It could very well be that files are dumped into a default location, and then, depending on the path specified in the Upload object, moved to their final destination.. but that would surprise me.
The one thing you definitely want to make sure is writable is your upload temp dir in PHP. Usually outside of the web root... I've had a number of people experience weird things with file uploads because they never get saved to the server at all due to write errors. A good hosting provider would never let that happen, though. :)
Sadly this client wanted to use their own hosting rather than mine.
Regarding access to the temp folder, does anyone know the relationship between this and the silverstripe-cache folder? On this client's install silverstripe-cache is used as the main SS temp files cache, and it was my impression that the PHP temp folder outside the client's web root would only be used IF SS found silverstripe-cache was not present. Anyone know if this is true?
For anyone else finding this thread later:
Yes it was incorrect permissions on the PHP temp folder. Even though we had correct permissions in the silverstripe-cache folder and the assets folders, it would seem that the Upload object does make use of the PHP temp folder on the web server.
This has happened yet again on a new client's system.
UncleCheese can you help me here please?
Is it a third party module called SWFUpload that handles uploading images via ImageGallery?
What I want to know is WHY does the image upload process make suse of a /tmp folder outside of the user's area. My client's hosting provider is saying that this script is at fault and should be using a local temp folder.
Any upload over PHP needs to write to a temp folder, regardless of the component that instantiated the upload, whether Flash or your browser, or whatever. If that temp folder isn't writable, you'll get an error code. I don't think it has anything to do with SWFUpload because I've seen FileIFrameFields do the same thing. But if you're looking for things to try, I might switch to the Uploadify module, since it's more stable and secure than SWFUpload.
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com
"Any upload over PHP needs to write to a temp folder"
But why is the image upload not using the /tmp folder in the user's shared hosting root? The point web hosting providers are making is that this script should not need permission to any temporary folder used by PHP at the server level due to security.
also "switch to the Uploadify module"
I though SWFUpload was requirement for ImageGallery?
How can I switch to Uploadify and will it provide same functionality?