Fatal error: Call to a member function on a non object in ..

dreant

Joined: 2002-09-13
Posts: 2
Posted: Fri, 2002-09-13 08:38

Am having a problem uploading pictures to my gallery.

It was working well before; someone else was granted access to the account (ftp/shell), and whilst I don't believe much damage was done (go-rwx on public_html was all I detected - everythign else seems fine although I believe more might have been done, then undone (???)), I've noticed now I'm unable to upload photos to existing albums.

Clicking on 'add photos', 'properties' (popup) or 'captions' (existing window) I see a:

Fatal error: Call to a member function on a non-object in /home/dreant/public_html/photos/classes/User.php on line 102

IF I were to click on 'permissions' the proper display is shown, and I can then click on add photos and add them correctly.

New albums apparently do not have this problem.

Reinstalling gallery over the existing installation (like an upgrade) doesn't fix it. Neither does renaming it or moving the existing albums around.

I've moved the /tmp to a directory inside my root with 777 permissions.

What am I missing, or where should I look? How do I rebuild the database or whatnot?

Help? Anyone?
:sad:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-14 06:15

The common cause for this problem is that you specified a bogus value for the "background image" of one of your albums.

This is complicated to explain. Basically, Gallery puts content into the <body>
tag with a link to the background image. But, if you put a bogus value in there (eg a color name like "red") then when Gallery requests the background it looks
like a link like this:

<body background="red">

Your browser translates that into a request for:

http://your.server/gallery/red

which mod_rewrite translates into "give me the album named red". Gallery
then points out "you don't have an album named red" and redirects that
request to the top level of Gallery and incidentally unsets your "current album"
setting in the session. The end result is that after loading the album, the
next thing you click is going to be broken unless you happen to click a link
that forces the specific album name (which the [permissions] link happens to
do).

The fix is to open the album, click the [permissions] link, then click [properties],
remove the offending background image entry and save the properties.

The first time this happened to one of my users it took me forever to
figure it out. Yes, it needs to be fixed. No, it probably won't get fixed in G1.
Yes it's fixed in G2 :smile:

 
ill
ill's picture

Joined: 2002-08-15
Posts: 756
Posted: Sat, 2002-09-14 07:16

That's an amazing an fascinating issue!
I am astonished that you actually found the reason, because the chain reaction is hard to break and especially unlikely to be cleared without true hacking from your side!

 
dreant

Joined: 2002-09-13
Posts: 2
Posted: Sun, 2002-09-15 06:09

Thanks for your detailed reply - indeed that was the problem!

I was starting to suspect gallery colors was breaking it, yet wasn't looking carefully enough!

It's all fixed now, and works great. =)

 
WERUreo

Joined: 2002-08-30
Posts: 2
Posted: Mon, 2002-09-16 00:34

Alright, I've been having this same error on my site, but there is nothing set in the background image field for my album.

As an addendum to this problem, sometimes I get the error, and sometimes I don't. I also get another error sometimes. "Fatal error: Call to a member function on a non-object in /classes/User.php on line 155" I've gotten this error when I've tried to create a new album and when I've tried to add photos to an album. And, again, sometimes I get the error, and sometimes I don't.

One last thing... I'll continue to try to see if this problem has already been addressed... For some reason, Gallery likes to log me out when I go from one page to another. It seems to happen most often when I am logged in and are working on an album, and then try to click on "Gallery" link to get to the main Album page... As with the other problems, this only seems to happen sometimes.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2002-09-16 02:56
Quote:
Alright, I've been having this same error on my site, but there is nothing set in the background image field for my album.

As an addendum to this problem, sometimes I get the error, and sometimes I don't. I also get another error sometimes.

Can you reproduce this reliably? I think that all of your problems are related to
issues around session management. Please make a test account on your server
and post the username/password here. The account doesn't have to have any
privileges, but I need to be able to log in so that I can tell when I'm getting logged
out.

 
sajjadnasiri

Joined: 2010-04-24
Posts: 1
Posted: Sat, 2010-04-24 14:35

I have installed Reverse Auction Factory component on my joomla website and when a user want to send new auction he/she encounter with this error:

Fatal error: Call to a member function get() on a non-object in /home/karanik/public_html/plugins/editors/xstandard.php on line 273

Does anyone has idea how can I solve this?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2010-04-24 15:29

Wow, this is an ancient thread. I don't understand what that has to do with Gallery.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here