(and also another block (gallery_new))
When adding this Block to my Webside I get this errors on my frontpage, I'm running PostNuke 0.723, on SuSE Linux 8.1 Pro, using Apache 1.36 and PHP 4.22, I did got some other errors, but they did have some thing to do with Permissions and is know correctet, but after that corrections I got this errors:
<!-- BBCode Start --><A HREF="http://pn.dembel.org/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=11" TARGET="_blank">More Info</A><!-- BBCode End --> can be found here (From my Gallery_New problem)
I'm running latest CVS version of Gallery.
Warning: extract() expects first argument to be an array in /srv/www/htdocs/gallery/init.php on line 60
Warning: extract() expects first argument to be an array in /srv/www/htdocs/gallery/init.php on line 61
Warning: extract() expects first argument to be an array in /srv/www/htdocs/gallery/init.php on line 62
Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/gallery/init.php on line 64
<!-- BBCode Start --><A HREF="http://www.heima.info" TARGET="_blank">My homepage</A><!-- BBCode End -->
I have deactivated this blocks due to this errors
Block Gallery_New and Block Gallery_Random have the exact same problems!
wbr
Joe
Posts: 75
I'm running almost the same setup, but using PostNuke 0.723, RH Linux 6.2, using Apache 1.3.23 and PHP 4.2.3, Gallery 1.3.2.
Maybe the latest CVS version of gallery has some issues with Random Block?
Posts: 2
Just got answer from Anonym user, Reigster globals = On, does fix this, it was Off (as default on PHP 4.2.x)
that was the trix
But thanx anyway... :roll:
Posts: 75
So, does that mean that Gallery 1.3.2 requires register globals = on?
I had it on too, just never really gave it a second thought....
Posts: 2
First off, thanks for the nice bit of programming to get gallery out to the front page of our postnuke site. Very sweet.
We, too, noticed that by switching register globals = on in php.ini that the problem described above disappears. However, like the rest of the postnuke community, we'd like to go with the security flow which compels us to turn register globals off. Any ideas how we might fix this so that we can turn register globals off?
Here's a snippet of code from the affected region of gallery/init.php:
:eek: thanks...
Posts: 77
Hi,
I thought a little bit an made a patch for init.php which solves these issues. The patch is for the latest cvs version from init.php!
As you can see it's not much to change. We only check if the variables inside the extract function are really arrays. Normally they are, but not when init.php is called by the block.
I'll ask Bharat to get this into the cvs. For now you have to patch it on your own. Please give me feedback, if it works for you.
Jörg
Posts: 2
Thanks, Jörg:
The block now works very well with register_globals off. Well done! Thanks, again... :grin:
Posts: 6
how do i apply that patch?
Posts: 77
Hello,
you don't have to apply the patch anymore. Bharat commited the patch to the current CVS tree. Get the latest version of gallery from the CVS at sourceforge.
Jörg
Posts: 6
Thanks, I grabbed the newest init.php but now I am getting this error:
I can't find anyone else on this forum with a similar error.
Posts: 1
I have exactly the same error :???: and cannot find a fix for it :cry:
... and applying joerg's patch to the original init.php file didn't work either..
Posts: 8
I got the latest version tonite and still have this error:
Warning: Invalid argument supplied for foreach() in /my/path/to/website/gallery/block-random.php on line 165
No photo chosen.