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
Posts: 13451
[Moved to the correct forum]
Posts: 2322
Is this while logged in, or logged out?
If logged in, is it an admin or a normal user?
Posts: 20
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.
Posts: 20
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.
Posts: 20
Unknown column 'id' in 'field list'
^^ More descriptive Error ^^
NOW can anyone help?
Posts: 20
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?
Posts: 2322
Wait a second... which one are you integrating into, Mambo or phpBB?
I highly doubt that the phpBB guy modified Mambo's user table...
Posts: 20
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?
Posts: 2322
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/*
Posts: 20
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.
Posts: 2322
Well, you need to undo this:
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.
Posts: 20
*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.
Posts: 1
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