Hello, I'm getting the following error both on my gallery pages and my image pages:
Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177
I've tried to go through the entire template-functions.php doc to see if any brackets were missing or anything like that, but I don't see anything missing... does anything stick out to anyone else?
Here is line 177: `foreach ($_zp_plugin_scripts as $script) {'
Here is the whole template-functions.php
'
The problem described above is caused by not having the 1.1.6 version if index.php. PHP 4 is just fine for zenphoto. Follow carefully the upgrade instructions. In fact, there is a video which shows exactly what to do. http://www.zenphoto.org/2008/04/watch-the-zenphoto-demonstration-videos/
I see, sorry about that...
Actually the problem I've encountered looked alike but is probably not the same: I've realized that my host only uses php 4.4.3 ... then I guess it's just a miracle that zenphoto-1.1.5 worked there (since the front page show php 4.10 as a requirement)
So in case anyone has a persistent problem with the foreach() loops begin given invalid arguments in version 1.1.6, it might be good to know that the previous version (1.1.5) [i]may[/i] work well anyway.
ok I've made a fresh install as a test site, if you want to have a look it's there :
http://tibonihoo.free.fr/zenphoto/
However for other reasons, I've transfered my site on an other host, where the newest version of zenphot works pretty well (of course ). And I'm afraid I won't be able to help much on this.
Thanks for your replies !
OK, the only cause for the problem at http://tibonihoo.free.fr/zenphoto/ that I can see is if the glob() is disabled on the server. This may show up in a PHPinfo result. You can also change the SAFE_GLOB define at the beginning of functions.php to be true.
We can put a test in to prevent the error, but other things will not work right if glob() is not functioning.
Ok I've just tried to put SAVE_GLOB to true in the functions.php and it does not seem to resolve the problem. By the way the phpinfo is accessible there: http://tibonihoo.free.fr/info.php
Maybe you shouldn't lose too much time on this, though, especially if I'm the only one to have the problem, since my host recently messed up my db in a very strange way and I don't know what else they have done (my wordpress installation is also kind of broken and the db does not seem to be the only problem)
Had the same problem with hostgator but now it works, thanks!