Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 10:56 pm EST
Geeklog Forums
Gallery again...
Status: offline
Euan
Forum User
Full Member
Registered: 04/22/02
Posts: 292
Having completed the fresh install of GL in 5 minutes, installed gallery in another 5 minutes, I am failing to integrate the two.
I get stuck with
1064: You have an error in your SQL syntax near 'WHERE username = 'Admin'' at line 1
The error log has
Sat Jul 6 11:35:09 2002 - 1064: You have an error in your SQL syntax near 'WHERE username = 'Admin'' at line 1 SQL in question: SELECT uid,fullname,email FROM WHERE username = 'Admin'
Which seems odd - there is no reference to the table name. Any ideas? Tables have the gl_ prefix which I have edited into the integration kit from Blaine.
phpwebhosting.com
Linux evo 2.4.18-5smp #1 SMP Mon Jun 10 15:19:40 EDT 2002 i686 unknown
Apache/1.3.26 (Unix)
PHP/4.2.1 mod_gzip/1.3.19.1a
MySQL Client API version 3.23.39
Any ideas?
Euan.
-- Heather Engineering
-- No job too small
-- Heather Engineering
-- No job too small
12
7
Quote
Status: offline
efarmboy
Forum User
Moderator
Registered: 02/26/02
Posts: 147
Euan,
I'm assuming the SQL error you have is being logged to the GL error log - thus is a GL error and not gallery ?
Have you determined which file is generating the error?
Do you also have the random gallery block setup - possibly disable to remove this as a possible source
When is the error occur - as soon as you launch GL or only when you go to gallery?
And one final question: what version of GL and Gallery are you using?
Cheers,
Blaine
6
4
Quote
Anonymous
Anonymous
Sorry - I should have given you more information.
I'm assuming the SQL error you have is being logged to the GL error log - thus is a GL error and not gallery ?
* GL error log so I think it is a GL error.
Have you determined which file is generating the error?
* It seems to be from line 35 of gallery/classes/geeklog/User.php which comes right after global $_TABLES;
$result = DB_query("SELECT username,fullname,email FROM {$_TABLES['gl_users']} WHERE uid = '$uid'"
Do you also have the random gallery block setup - possibly disable to remove this as a possible source
* Disabled: no effect.
When is the error occur - as soon as you launch GL or only when you go to gallery?
* Error only occurs when I actually go to gallery - the phpblock for gallery shows images perfectly, but when I click on the image or go to the top of gallery (http://g-comm.net/gallery) I get the same error.
And one final question: what version of GL and Gallery are you using?
* Geeklog 1.3.5SR1 and Gallery 1.3
Thanks again,
Euan.
10
3
Quote
Status: offline
efarmboy
Forum User
Moderator
Registered: 02/26/02
Posts: 147
Euan,
Can you double check the syntax on line 35 - The $result=DB_query .... line. Remove any return so it's only one line incase there is some odd formating in there.
This function only appears to execute when I try to modify album permissions. I placed a debug stmt in the function and it did not get called to View albums.
Try adding a few debug lines. I like to use the COM_errorLOG function that outputs to the error.log file.
Not sure if these examples will display properly once GL processes them but here are some examples:
COM_errorLOG("TABLES[users] is: " . $_TABLES['users']);
or output the SQL command
COM_errorLOG("SELECT username,fullname,email FROM " . $_TABLES['users'] . "WHERE uid = " . $uid);
Blaine
4
15
Quote
Anonymous
Anonymous
Ahem. I don't think I really want to admit this, but I'll come clean if you promise not to shout at me. Okay? Okay. The whole thing was my mistake. I actually tried almost everything you suggested, and finally realised I'd been stupid. It really wasn't necessary to change the table names to gl_xxx... that's the whole point of the $_TABLES global. Oops. Sorry. Penance? I'll get those Chinese and Korean language files translated for the team. m(_ _)m
7
9
Quote
All times are EST. The time is now 10:56 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content