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?

Subscribe
Share

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

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.

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