![]() |
|
Invalid argument supplied for foreach() Error - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Invalid argument supplied for foreach() Error (/thread-2852.html) |
Invalid argument supplied for foreach() Error - benjancewicz - 2008-05-11 Hello, I'm getting the following error both on my gallery pages and my image pages:
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 ' Invalid argument supplied for foreach() Error - sbillard - 2008-05-11 The most likely cause of this is that you did not update the root index.php file when you upgraded your installation. It is important to update all the files from the distribution when you upgrade. Invalid argument supplied for foreach() Error - tibonihoo - 2008-05-19 I have a similar problem after an upgrade to 1.1.6, could this be caused by using a php5 specific feature (my host uses php4) ? Note that I don't know much about php, I've just read that the foreach function had accepted different arguments in php5... Invalid argument supplied for foreach() Error - sbillard - 2008-05-19 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/ Invalid argument supplied for foreach() Error - tibonihoo - 2008-05-21 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. Invalid argument supplied for foreach() Error - sbillard - 2008-05-21 I doubt that there is a difference between 4.4.3 and 4.10 in terms of the Invalid argument supplied for foreach() Error - tibonihoo - 2008-05-29 ok I've made a fresh install as a test site, if you want to have a look it's there : 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 ! Invalid argument supplied for foreach() Error - sbillard - 2008-05-29 OK, the only cause for the problem at http://tibonihoo.free.fr/zenphoto/ that I can see is if the We can put a test in to prevent the error, but other things will not work right if Invalid argument supplied for foreach() Error - tibonihoo - 2008-05-31 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) Invalid argument supplied for foreach() Error - sbillard - 2008-05-31 OK. If you wish, the nightly build has two things that might shed some light on this. First, it will not get the error as it tests to see if something has been returned from the call. Second, there is some tests now in setup.php to see if Invalid argument supplied for foreach() Error - NaWer - 2008-06-11 Hi all Same thing here, on the same host (free.fr) and put define('SAFE_GLOB', true); in function.php work like a charm Thanks for zenphoto... really (u rock Invalid argument supplied for foreach() Error - Moderne Kunst - 2009-07-25 Had the same problem with hostgator but now it works, thanks! |