Page 1 of 1

Temporary Storage

Posted: 2011-01-17T20:58:31-07:00
by meowmeow
Recently my host contacted me about filling the temporary storage on my shared server- they didn't tell me this with kind words. The cause of this was me processing very large files with Image Magick. As a result, I'm trying to use have it use a different directory using the following code:

Code: Select all

convert -define registry:temporary-path=/tmp/magick ...
The code executes correctly, but I'm not sure if it is properly using the alternate directory. Is there away for me to verify this is using my site's local directory rather than the default directory? (Other than waiting to see if I ever get suspended again...)

Re: Temporary Storage

Posted: 2011-01-17T22:47:03-07:00
by anthony
That depends on the access you have.

If it is PHP only then you can put an 'ls' command in a PHP script to see directory contents.

If it is a matter of clean up you can set up a program to delete files in your temporary directory that are older than some period, say an hour or day or more.
There are lots of ways to skin a cat, and what method you use depends
on what you want that skin for, and how messy you like the results!

Re: Temporary Storage

Posted: 2011-01-18T08:43:24-07:00
by meowmeow
If it is a matter of clean up you can set up a program to delete files in your temporary directory that are older than some period, say an hour or day or more.
That's what I'm hoping to do. I need to force Image Magick to use a directory I have access to so I can clean up after myself when I'm finished using it. The code in my original post gives the output I expect but I need to convince myself that it is actually using this other directory.
If it is PHP only then you can put an 'ls' command in a PHP script to see directory contents.
Its more so that I need to see that it has been written there and then deleted. I tried refreshing the directory in FileZilla while it was processing but I didn't see any files appear. That's why I was hoping for a log to show what was written/deleted in the directory.