DreamObjects File Lister

Hey all,

I created a php script that will list the contents of a DreamObjects bucket on a web page. The list of files will be signed links valid for 30 minutes. This means even objects that have their ACLs set to private will be able to be downloaded.

If you use this, I’d recommend securing it with .htaccess. There’s a nice forum post about doing so here - https://discussion.dreamhost.com/thread-135044.html

The code is freely available on github. Feel free to use and modify. https://github.com/dreamhost/dhdofiles

I’ve seen a few questions about using DreamObjects with secured files on a site so I hope this helps.


Thank you very much for this useful script…

I have a question: how can I fix the error, which I get every time, when a number of listed files becomes more than 1000.
The error looks like that:

Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: Entity: line 1: parser error : xmlParseCharRef: invalid xmlChar value 7 in /home/***/aws/Guzzle/Http/Message/Response.php on line 877

Thanks in advance,

Hi Nikita,

I just did a little testing on this. It doesn’t look like the issue is specific to to having more than 1000 files as I’ve just tested this with 15000 files (on a VPS). Taking a guess, I’d say you’re running into a memory issue.