Error mysql_fetch_row() in Mambo/Gallery.

LegendX

Joined: 2005-04-25
Posts: 20
Posted: Mon, 2005-04-25 17:43

I have checked other threads/posts regarding this issue but found no solution to help me.

I am getting this error message where gallery is integrated into Mambo.

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/mjpesci/volvomeets.com/gallery/classes/database/mysql/Database.php on line 37

I am using Mambo version 4.5.2.x
----
The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery version: 1.5
Apache version: Not Shown in PHP Diag
PHP version (don't just say PHP 4, please): 4.3.10
Graphics Toolkit: NetPBM
Operating system: Redhat Linux
Web browser/version (if applicable): Mozila Firefox 1.0.3

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2005-04-25 18:03

[Moved to the correct forum]

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Mon, 2005-04-25 18:14

Is this while logged in, or logged out?

If logged in, is it an admin or a normal user?

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Mon, 2005-04-25 19:00

I just tested. It is both when logged in and logged out.

http://www.volvomeets.com/index.php?option=com_gallery&Itemid=3

I took it off the main menu but there is a link to the component front end so you can see for yourself.

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Thu, 2005-04-28 14:09

Could somebody please help me at least with where to start looking to solve this problem. :(

It's the top priority for my site right now and if I can't get Gallery working I'll have to start from scratch all over again.

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Fri, 2005-04-29 17:39

Unknown column 'id' in 'field list'

^^ More descriptive Error ^^

NOW can anyone help? :(

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Fri, 2005-04-29 17:54

I sort of have this figured out now - the "great guy" who integrated phpBB into Mambo changed the key/auto field to be user_id instead of id.

where in gallery's integration php does it call for $id so that I can fix this to call for $user_id instead?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Fri, 2005-04-29 18:02

Wait a second... which one are you integrating into, Mambo or phpBB?

I highly doubt that the phpBB guy modified Mambo's user table...

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Fri, 2005-04-29 20:33

Gallery is being integrated into "Mambo Plus", which is Mambo with seperate phpBB, but the users DB is shared by both applications.

The users table has *definitely* been modified. I compared it to a plain old mambo DB I built in another directory of my server.

ID -> user_id
password -> user_password?

I tried replacing every instance of $id with $user_id in gallery/*.* but I STILL get the error. GRR! Where else is it being called from? :(

I'm going to look at the phpBB integrating files and compare to the Mambo ones, I think. Maybe using phpBB info will help?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Fri, 2005-04-29 20:40

Ahh. Well, you never said anything other than Mambo, before. We don't support "Mambo Plus" for just this reason.

You can change 'id' in many places, but I can't guarantee that it will work.

Look for "$this->fields{'uid'}" in classes/mambo/*

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Fri, 2005-04-29 20:52

I changed every single instance using a search and replace tool, but it still doesn't work. <_< I understand you don't officially support it, but I'm trying to get it to integrate into this site even if I have to do some editing/tweaking and I appreciate any help that's offered.

I found that line in each of the PHP files in the mambo directory but I'm not sure what to do with it.

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Fri, 2005-04-29 21:09

Well, you need to undo this:

Quote:
I tried replacing every instance of $id with $user_id in gallery/*.*

Just edit the files I mentioned and change 'uid' to 'user_id'. If that doesn't do it, well... I'm not sure what to tell you, really.

 
LegendX

Joined: 2005-04-25
Posts: 20
Posted: Fri, 2005-04-29 21:43

*sigh*

tried adding an ID and UID field on the table and copying user_id's values to them - but I still get the error.

I undid my $id -> $user_id change... in retrospect I'm not sure why I thought changing the variable names would work. :unsure:

I also tried your suggestion, but it results in a syntax error.

I guess I will have to run gallery seperately. :( Thank you for trying.

 
robhouse

Joined: 2005-10-16
Posts: 1
Posted: Sun, 2005-10-16 12:24

I've been looking at integrating MamboPlus with Gallery and I believe I have found the solution. You need to modify init.php. Around line 400, in the mambo specifics, you'll find a line (or 5) that look like this;
array ('name' => 'name', 'uname' => 'username', 'email' => 'email', 'uid' => 'id', 'gid' => 'gid');

change it to;
array ('name' => 'name', 'uname' => 'username', 'email' => 'user_email', 'uid' => 'user_id', 'gid' => 'gid');

Regards,

Rob House