Crop and Rotate doesn't work Crop and Rotate doesn't work
 

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

Crop and Rotate doesn't work

Started by hl90, July 07, 2008, 12:05:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hl90

Hey everyone I have some problems with my "crop and rotate". Everytime
I get this message:

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

I asked my host about this but he said that it only works for smaller pictures but
at my other galleries I can easily do it even tough they are very big.
I did changed from sever so maybe that's the problem?

Joachim Müller

Quote from: hl90 on July 07, 2008, 12:05:45 AM
"Critical error
There was an error while processing a database query"
Enable debug mode in coppermine's config to get the actuaql error message (to see what is actually wrong). Post your error message (not the debug_output) here.
Quote from: hl90 on July 07, 2008, 12:05:45 AM
I asked my host about this but he said that it only works for smaller pictures
Your webhost is correct.

hl90

#2
Hello sorry for my late reponse. I didn't saw my password between it so if you see it can you please
change it for me? I get this if I enable my debug mode:

USER:
------------------
Array
(
    [ID] => c57c383d8657643bc3c264de73f8c897
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => ***
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [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] => 0
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg149_filetypes; (0.001s)
    [1] => select * from cpg149_plugins order by priority asc; (0s)
    [2] => delete from `williamm_gallery`.cpg149_sessions where time<1217358750 and remember=0; (0.001s)
    [3] => delete from `williamm_gallery`.cpg149_sessions where time<1216152750; (0s)
    [4] => select user_id from `williamm_gallery`.cpg149_sessions where session_id = 'b58343fba951209b7c33a67a46c7badb' (0.001s)
    [5] => select user_id as id, user_password as password from `williamm_gallery`.cpg149_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `williamm_gallery`.cpg149_users AS u INNER JOIN `williamm_gallery`.cpg149_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
    [7] => SELECT user_group_list FROM `williamm_gallery`.cpg149_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => 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 cpg149_usergroups WHERE group_id in (1) (0.001s)
    [9] => SELECT group_name FROM  cpg149_usergroups WHERE group_id= 1 (0.001s)
    [10] => update `williamm_gallery`.cpg149_sessions set time='1217362350' where session_id = 'b58343fba951209b7c33a67a46c7badb' (0.001s)
    [11] => SELECT user_favpics FROM cpg149_favpics WHERE user_id = 1 (0.001s)
    [12] => DELETE FROM cpg149_banned WHERE expiry < '2008-07-29 20:12:30' (0.001s)
    [13] => SELECT * FROM cpg149_banned WHERE (ip_addr='81.71.96.165' OR ip_addr='81.71.96.165' OR user_id=1) AND brute_force=0 (0.001s)
    [14] => SELECT cid, name, description, thumb FROM cpg149_categories WHERE parent = ''  ORDER BY pos (0.001s)
    [15] => SELECT aid FROM cpg149_albums as a WHERE category>=10000 (0.001s)
    [16] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category >= 10000 (0.001s)
    [17] => SELECT aid FROM cpg149_albums WHERE category = 3 (0.001s)
    [18] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 3 (0.001s)
    [19] => SELECT count(*) FROM cpg149_albums as a WHERE category = '3' (0.001s)
    [20] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=3 ORDER BY a.pos LIMIT 0,6 (0.001s)
    [21] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (37, 27, 116, 119, 134, 155)GROUP BY a.aid (0.001s)
    [22] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='315' (0.001s)
    [23] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='2593' (0.001s)
    [24] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='2678' (0.001s)
    [25] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3034' (0.001s)
    [26] => SELECT aid FROM cpg149_albums WHERE category = 4 (0.001s)
    [27] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 4 (0.001s)
    [28] => SELECT aid FROM cpg149_albums WHERE category = 5 (0.001s)
    [29] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 5 (0.001s)
    [30] => SELECT count(*) FROM cpg149_albums as a WHERE category = '5' (0.001s)
    [31] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=5 ORDER BY a.pos LIMIT 0,12 (0.001s)
    [32] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (190, 39, 167, 68, 179, 171, 35, 90, 170, 49, 164, 94)GROUP BY a.aid (0.002s)
    [33] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4377' (0.001s)
    [34] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='389' (0.001s)
    [35] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4347' (0.001s)
    [36] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1158' (0.001s)
    [37] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4012' (0.001s)
    [38] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3891' (0.001s)
    [39] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4558' (0.001s)
    [40] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1580' (0.001s)
    [41] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4585' (0.001s)
    [42] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='918' (0.001s)
    [43] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3785' (0.001s)
    [44] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1916' (0.001s)
    [45] => SELECT aid FROM cpg149_albums WHERE category = 6 (0.001s)
    [46] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 6 (0.001s)
    [47] => SELECT count(*) FROM cpg149_albums as a WHERE category = '6' (0.001s)
    [48] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=6 ORDER BY a.pos LIMIT 0,12 (0.001s)
    [49] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (97, 174, 44, 45, 36, 42, 145, 43, 148, 47, 78, 157)GROUP BY a.aid (0.002s)
    [50] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='747' (0.001s)
    [51] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='745' (0.001s)
    [52] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='712' (0.001s)
    [53] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3270' (0.001s)
    [54] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='734' (0.001s)
    [55] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3784' (0.001s)
    [56] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='782' (0.001s)
    [57] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1418' (0.001s)
    [58] => SELECT aid FROM cpg149_albums WHERE category = 7 (0.001s)
    [59] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 7 (0.002s)
    [60] => SELECT count(*) FROM cpg149_albums as a WHERE category = '7' (0.001s)
    [61] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=7 ORDER BY a.pos LIMIT 0,12 (0.001s)
    [62] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (11, 12, 13, 14, 15, 16, 61, 108, 125, 139, 158, 165)GROUP BY a.aid (0.006s)
    [63] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1390' (0.001s)
    [64] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1260' (0.001s)
    [65] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1258' (0.001s)
    [66] => SELECT aid FROM cpg149_albums WHERE category = 19 (0.001s)
    [67] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 19 (0.001s)
    [68] => SELECT aid FROM cpg149_albums WHERE category = 10 (0.001s)
    [69] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 10 (0.001s)
    [70] => SELECT count(*) FROM cpg149_albums as a WHERE category = '10' (0.001s)
    [71] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=10 ORDER BY a.pos LIMIT 0,8 (0.001s)
    [72] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (17, 18, 122, 140, 142, 144, 146, 168)GROUP BY a.aid (0.002s)
    [73] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='149' (0.001s)
    [74] => SELECT aid FROM cpg149_albums WHERE category = 16 (0.001s)
    [75] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 16 (0.001s)
    [76] => SELECT aid FROM cpg149_albums WHERE category = 23 (0.001s)
    [77] => SELECT count(*) FROM cpg149_pictures as p, cpg149_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 23 (0.001s)
    [78] => SELECT count(*) FROM cpg149_albums as a WHERE category = '23' (0.001s)
    [79] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg149_albums as a LEFT JOIN cpg149_pictures as p ON a.thumb=p.pid WHERE category=23 ORDER BY a.pos LIMIT 0,7 (0.001s)
    [80] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg149_albums AS a  LEFT JOIN cpg149_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (176, 70, 76, 86, 192, 79, 104)GROUP BY a.aid (0.001s)
    [81] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='3968' (0.001s)
    [82] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4575' (0.001s)
    [83] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4365' (0.001s)
    [84] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1523' (0.001s)
    [85] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='4382' (0.001s)
    [86] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='1419' (0.001s)
    [87] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg149_pictures WHERE pid='2261' (0.001s)
    [88] => SELECT aid FROM cpg149_albums as a WHERE category = '0' (0.001s)
    [89] => SELECT count(*) FROM cpg149_albums as a WHERE 1 (0s)
    [90] => SELECT count(*) FROM cpg149_pictures as p LEFT JOIN cpg149_albums as a ON a.aid=p.aid WHERE 1 AND approved='YES' (0.008s)
    [91] => SELECT count(*) FROM cpg149_comments as c LEFT JOIN cpg149_pictures as p ON c.pid=p.pid LEFT JOIN cpg149_albums as a ON a.aid=p.aid WHERE 1 (0.001s)
    [92] => SELECT count(*) FROM cpg149_categories WHERE 1 (0s)
    [93] => SELECT sum(hits) FROM cpg149_pictures as p LEFT JOIN cpg149_albums as a ON p.aid=a.aid WHERE 1 (0.023s)
    [94] => SELECT COUNT(*) FROM cpg149_pictures WHERE approved = 'NO' (0.005s)
    [95] => SELECT count(*) FROM cpg149_albums as a WHERE category = '0' (0.001s)
    [96] => SELECT COUNT(*) from cpg149_pictures WHERE approved = 'YES'  (0.005s)
    [97] => SELECT * FROM cpg149_pictures WHERE approved = 'YES'  ORDER BY RAND() LIMIT 8 (0.161s)
    [98] => SELECT COUNT(*) from cpg149_pictures WHERE approved = 'YES'  (0.009s)
    [99] => SELECT * FROM cpg149_pictures WHERE approved = 'YES'  ORDER BY pid DESC  LIMIT 0 ,8 (0.001s)
)

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

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.8 - OK
------------------
mySQL version: 5.0.45-community
------------------
Coppermine version: 1.4.18(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support:
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.45
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/local/lib/php | .:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
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 | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.455 seconds - 100 queries in 0.308 seconds - Album set : ; Meta set: ;

hl90

#3
Here's another one:
---------------
While executing query "UPDATE cpg149_pictures
                          SET pheight = ,
                            pwidth = ,
                                                        filesize = 4096,
                                                        total_filesize = 221121
                          WHERE pid = '4581'" 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 '
                            pwidth = ,
                                        ' at line 2

---------------

Sorry I dont know which one it the right one.

Joachim Müller

Your first reply contains the debug_output (the stuff I explicitely told you not to post). The second reply contains the error message. Post a link to your gallery.

hl90


hl90

Does it mean that I have to use another mySQL version for my gallery?

Joachim Müller

No, I rather guess that the error message comes from custom hacks you applied. Try vanilla core files and the classic theme and see if this fixes your issues.

hl90

What do you mean the vanilla core files? And sorry I gave you the wrong url of my gallery. I moved
it to another server and now "crop and rotate" doesn't work anymore. And I have already the classic
theme.

hl90

Maybe it's because I changed from servers?  ???

hl90


hl90

#11
So I have still problems with the crop and rotate..and I wanted to know
where I can change the SET pheight and pwidth? Is that possible? Maybe
that's the problem?

While executing query "UPDATE cpg149_pictures
SET pheight = ,
pwidth = ,
filesize = 4096,
total_filesize = 221121
WHERE pid = '4581'" on 0

Joachim Müller

#12
Quote from: hl90 on August 02, 2008, 10:08:08 PM
No one can help me?  ???
I already told you what to do. Apart from that, you should crop and rotate on your client before uploading - that gives faster and better results.

Quote from: hl90 on August 03, 2008, 12:41:47 AM
So I have still problems with the crop and rotate.
Then why did you start a new thread if the issue you started in this thread is not solved and your new thread deals with exactly the same thing? Don't spread identical questions all over the board - it doesn't get more likely that someone will actually look into your issues. I merged your new thread with the existing one... ::)

hl90

Ok sorry but I use crop and rotate to change the picture. Because sometimes I have pictures
viewed more than 2000 times and for example it's a smaller picture and I found a bigger
one I want to change it into that. I don't use crop and rotate for changing the size of my
current picture.

Joachim Müller

Then use the file replacement plugin or do as I told you to do.