Fatal Error: Call to a member function and HELP need to get

MolleeO

Joined: 2002-08-21
Posts: 8
Posted: Thu, 2002-08-22 00:33

Well I am getting a similar error -- I hope someone can help me. I also have a couple of questions.

When my gallery was originally set up, the person that set it up, created two versions of the gallery, the embedded and non-embedded one. Well, the non-embedded has the login for the admin and the embedded doesn't.

How do I get the login on the embedded one, and get rid of the non-embedded version?

The non-embedded version is on again, off again with this error:

Fatal error: Call to a member function on a non-object in /var/www/html/modules/Photo_Gallery/classes/Album.php on line 685

Now I looked at the code, and this is what it is and it looks fine:
function numHidden() {
$cnt = 0;
for ($i = 1; $i <= $this->numPhotos(1); $i++) {
$photo = $this->getPhoto($i);
if ($photo->isHidden()) { <--------- this is where line 685 is
$cnt++;

Can someone please help me? Please email me asap if you have an answer:

. This gallery is very large and used every day.

So, if anyone can answer about the fatal error, and also how to get the login code enabled for the embedded version I would be forever grateful! Thanks!

 
MolleeO

Joined: 2002-08-21
Posts: 8
Posted: Thu, 2002-08-22 17:03

Bumping this up -- someone please help!!!!!!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-08-22 19:00

You posted this twice so I missed this thread. I answered your question <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=163" TARGET="_blank">here</A><!-- BBCode End -->, yesterday. You should post any replies in this topic, though so that we keep them all together.

 
TheWatcher
TheWatcher's picture

Joined: 2002-08-21
Posts: 120
Posted: Thu, 2002-08-22 19:05
Quote:
Bumping this up -- someone please help!!!!!!

The only difference of the two is admin account.

I suggest that you retain non-embedded for easy administration of the gallery.

Did you move your gallery from one location to another? Please give me a brief history of this problem.

TheWatcher...

 
MolleeO

Joined: 2002-08-21
Posts: 8
Posted: Fri, 2002-08-23 03:59

We use phpnuke version 5.3.

The person who set it up, set up both the embedded and non-embedded because they didn't follow the directions. Only the stand-alone has the login to the admin. I'd like to only have the embedded version however, with the admin login is this possible? I never wanted the standalone version but they just sort of launched it without asking (this was over a year ago...).

In any case, here are the answers to your questions:

We didn't move the location of the gallery, at least to my knowledge. It's where it's always been.

To answer Bharat:
What is the embedded one actually embedded in? (eg PostNuke, PHP-Nuke, Geeklog etc)
I looked at your site but it was not obvious.

Quote:
--------------------------------------------------------------------------------

How do I get the login on the embedded one, and get rid of the non-embedded version?

--------------------------------------------------------------------------------

In embedded mode, Gallery uses the outer application for authentication so I can't help you until I know more about your configuration.

We use phpnuke 5.3 with mysql 3.23.41 and apache 1.3

Quote:
--------------------------------------------------------------------------------

The non-embedded version is on again, off again with this error:

Fatal error: Call to a member function on a non-object in /var/www/html/modules/Photo_Gallery/classes/Album.php on line 685

--------------------------------------------------------------------------------

You've got an older version of Gallery there. It looks like v1.2.5 -- you should upgrade to v1.3 as we've introduced fixes in the code that will resolve this (and a lot of other) issues.

so this error is because the gallery is old? is there anything wrong with the code I pasted?

Thank you for taking the time to post -- I would really love an answer and perhaps a walk through on upgrading, I am unfortunately quite clueless on how to do this since I didn't install it in the first place...ayi!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2002-08-23 17:21
Quote:
We use phpnuke version 5.3.

The person who set it up, set up both the embedded and non-embedded because they didn't follow the directions. Only the stand-alone has the login to the admin. I'd like to only have the embedded version however, with the admin login is this possible? I never wanted the standalone version but they just sort of launched it without asking (this was over a year ago...).

Ok. With PHP-Nuke, if you log on as an admin to Nuke you'll automatically be recognized as an admin in Gallery.

Quote:
so this error is because the gallery is old? is there anything wrong with the code I pasted?

Most likely what happened is that one of your albums went bad. This happens occasionally. Gallery v1.3.1 is smarter about recovering from that; sometimes it can recover the album, sometimes it can't. But either way it is better about letting you keep using the program and ignoring the bad album (and notifying you that there's a problem).

Upgrading is pretty easy. There's a link to the upgrading instructions on the <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Help&amp;" TARGET="_blank">I Need Help!!!</A><!-- BBCode End --> page.

 
MolleeO

Joined: 2002-08-21
Posts: 8
Posted: Sat, 2002-08-24 22:53

That's exactly what it was. We found the bad album. Thanks for all the help!