"There was an error while processing a database query" "There was an error while processing a database query"
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

"There was an error while processing a database query"

Started by pacimir, March 21, 2006, 07:14:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pacimir

I get this error when i try to write a comment. The interesting is that the comment is under the pic after that :)
I repaired the SQL, but no effect.

Also i have this error when try to delete a picture.


QuoteWhile executing query "SELECT n.user_id, n.mail_sent, u.user_email, u.user_name, p.owner_id, p.owner_name, p.title, p.filename  FROM  AS n INNER JOIN cpg132_users AS u ON n.user_id=u.user_id  INNER JOIN cpg132_pictures AS p ON n.picture_id=p.pid WHERE n.picture_id=2058" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS n INNER JOIN cpg132_users AS u ON n.user_id=u.user_id  INNER JOIN cpg132_pict' at line 1


USER:
------------------
Array
(
    [ID] => **************************
    [am] => 1
    [liv] => Array
        (
            [0] => 1018
            [1] => 2062
            [2] => 2065
            [3] => 907
            [4] => 2058
        )

    [search] => ###krasi
    [uid] => 1149
    [lap] => 9
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => Pacimir
    [user_password] => ********
    [user_lastvisit] => 2006-03-02 15:28:25
    [user_regdate] => 2005-02-08 19:54:20
    [user_group_list] =>
    [user_email] =>
    [user_website] => www.*******.com
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [auto_subscribe_post] => 0
    [auto_subscribe_comment] => 0
    [disk_max] => 9000
    [disk_min] => 9000
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Админ
    [upload_form_config] => 3
    [group_quota] => 9000
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg132_filetypes;
    [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '510f28d75b3e4a2906a9e8c4eb8f8b67'
    [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
    [4] => DELETE FROM cpg132_banned WHERE expiry < '2006-03-21 19:51:26'
    [5] => SELECT * FROM cpg132_banned WHERE ip_addr='213.240.224.68' OR ip_addr='213.240.224.68' OR user_id=1
    [6] => SELECT comments FROM cpg132_pictures, cpg132_albums WHERE cpg132_pictures.aid = cpg132_albums.aid AND pid='2058'
    [7] => SELECT author_md5_id, author_id FROM cpg132_comments WHERE pid = '2058' ORDER BY msg_id DESC LIMIT 1
    [8] => INSERT INTO cpg132_comments (pid, msg_author, msg_body, msg_date, author_md5_id, author_id, msg_raw_ip, msg_hdr_ip) VALUES ('2058', 'Pacimir', 'test', NOW(), '', '1', '213.240.224.68', '213.240.224.68')
    [9] => SELECT auto_subscribe_comment FROM cpg132_users WHERE user_id='1'
    [10] => SELECT n.user_id, n.mail_sent, u.user_email, u.user_name, p.owner_id, p.owner_name, p.title, p.filename  FROM  AS n INNER JOIN cpg132_users AS u ON n.user_id=u.user_id  INNER JOIN cpg132_pictures AS p ON n.picture_id=p.pid WHERE n.picture_id=2058
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [event] => comment
    [pid] => 2058
    [msg_author] => Pacimir
    [msg_body] => test
    [submit] => OK
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.1.16-log
------------------
Coppermine version: 1.3.5
==========================
Module: gd
------------------
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 4.1.16
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql/include/mysql
MYSQL_LIBS -L/usr/local/mysql/lib/mysql -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.1
Linked Version 1.2.1
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | /usr/phpbin | /usr/phpbin
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /usr/phpbin | /usr/phpbin
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .: | .:
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 20 | 20
max_input_time | 30 | 30
upload_max_filesize | 16M | 16M
post_max_size | 16M | 16M
==========================
Page generated in 0.043 seconds - 11 queries in 0.002 seconds - Album set :


Other problems in my gallery :)

Undefined index: cat_thumb in /*******/themes/*******/theme.php on line 1077

Notice: Undefined index: allowed_albums in /*******/include/functions.inc.php on line 578

Notice: Undefined index: allowed_albums in /*******/include/functions.inc.php on line 578

Notice: Undefined variable: ri in /*******/displayimage.php on line 190

Notice: Undefined variable: ri in /*******/displayimage.php on line 190

Notice: Undefined variable: IPTC_data in /*******/include/iptc.inc.php on line 49

Notice: Undefined variable: meta_keywords in /*******/displayimage.php on line 653

Notice: Undefined index: allowed_albums in /*******/root/themes/digital_flow/theme.php on line 903


::) 10x in advance

Nibbler

Uninstall whatever mod you added to cause the error.

pacimir

This is the problem. I have no mod instaled.

This become when i tried to update 1.3.5 to 1.4.4
I had a lot of problems with my theme and i decided to restore the 1.3.5 install
I deleted all files from directori, and uploaded my backup. Same with database

I CHMOD-ed the allbums, edit, userpics and dirs inside to 777

What to do now ?


Nibbler

You have this mod installed judging by the error message. Make sure all your files are either 1.3.5 or 1.4.4 and not a mixture of the 2.

pacimir

I have a lot of mods installed :)
I removed the comments mod and the problem is solved :)
10x!

For deleting i have this error:

QuoteWhile executing query "DELETE FROM  WHERE picture_id='2071'" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE picture_id='2071'' at line 1

Joachim Müller


pacimir

Quote from: GauGau on March 24, 2006, 06:39:00 AM
:o

I have no new mods installed last 5-6 months, that's what i wanted to say ;)

10x for support!!!  ;)