Question

RecursiveIteratorIterator does not work - php5-fpm

Hello,

I am trying to use RecursiveIteratorIterator with RecursiveDirectoryIterator to return an array of recursive files and folders.

This used to work on a Apache2 + php5 setup but I recently moved over to nginx and php5-fpm.

Everything on my site works perfectly except this particular function.

I do a var_dump on the variable those 2 functions are set on and it returns:

object(RecursiveIteratorIterator)#218 (0) { }

I dunno what’s wrong or if I’m missing a particular php5 package that’s suppose to be installed.

Anyone have any ideas?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi! RecursiveIteratorIterator is part of the base php5 package so it should be there by default. Are you getting any errors? Check nginx’s error log:

sudo tail /var/log/nginx/error.log