Hello,
Here is my problem. I am using WinXp, with Netscape 7.0, and you rCoppermine program 1.3.2 . I make my categories, then try to make the album name which goes through but, I get this error message and it's at the top of my website page. Every entry I enter for the album does this. I have changed the other setting from 777, 755 and no difference.
Error:
Warning: Division by zero in file/file/file/public_html/gallery/include/functions.inc.php on line 1018.
How do I not get this? I use Frontpage, so I looked at the file -- include/functions.inc.php. Is the problem related to cookies or some such thing? If it is how do I fix it?
Thanks for help!!
jojobean :)
What is your setting for 'Max dimension of a thumbnail' in config ?
Also please run the latest stable version of Coppermine, 1.3.3
Let's see... I tried to update the program to the most recent version. I downloaded it and opened it to my computer. Then I tried with the FTP -smart program to upoad it. I have tried several times. I even tried file by file. What am I doing wrong??? How do I update the program on my server??
The max. file setting for my pics is: w 150 h 120 Is this to large? What are the max. dimentions?
Cookie setting is 132. Is this ok? Or should it be something different?
Here is the debug info. and the website link:
USER:
------------------
Array
(
[ID] => 23ea7f4493fbc4d0aff71331be37236a
[am] => 1
[theme] => classic
[liv] => Array
(
- => 15
[1] => 17
[2] => 18
[3] => 19
[4] => 20
)
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_group] => 1
[user_active] => YES
[user_name] => *******
[user_password] => ********
[user_lastvisit] => 2005-07-28 11:12:22
[user_regdate] => 2005-07-11 23:08:31
[user_group_list] =>
[user_email] =>
[user_website] =>
[user_location] =>
[user_interests] =>
[user_occupation] =>
[user_actkey] =>
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 0
[can_send_ecards] => 0
[ufc_max] => 1
[ufc_min] => 1
[custom_user_upload] => 1
[num_file_upload] => 10
[num_URI_upload] => 10
[can_post_comments] => 0
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[pub_upl_need_approval] => 1
[priv_upl_need_approval] => 1
[group_name] => Administrators
[upload_form_config] => 1
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
[groups] => Array
(
[1] => 1
)
)
==========================
Queries:
------------------
Array
(
- => SELECT extension, mime, content FROM cpg_filetypes;
[1] => SELECT * FROM cpg_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '21232f297a57a5a743894a0e4a801fc3'
[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 cpg_usergroups WHERE group_id in (1)
[3] => SELECT group_name FROM cpg_usergroups WHERE group_id= 1
[4] => DELETE FROM cpg_banned WHERE expiry < 1122567147
[5] => SELECT * FROM cpg_banned WHERE ip_addr='142.177.81.145' OR ip_addr='142.177.81.145' OR user_id=1
[6] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '' ORDER BY pos
[7] => SELECT aid FROM cpg_albums WHERE category = 2
[8] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 2
[9] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg_pictures WHERE pid='21'
[10] => SELECT count(*) FROM cpg_albums as a WHERE category = '2'
[11] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg_albums as a LEFT JOIN cpg_pictures as p ON a.thumb=p.pid WHERE category=2 ORDER BY a.pos LIMIT 0,1
[12] => SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload FROM cpg_pictures WHERE aid IN (39) AND approved = 'YES' GROUP BY aid
[13] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '2' ORDER BY pos
[14] => SELECT aid FROM cpg_albums as a WHERE category>=10000
[15] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category >= 10000
[16] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '1' ORDER BY pos
[17] => SELECT aid FROM cpg_albums WHERE category = 4
[18] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 4
[19] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '4' ORDER BY pos
[20] => SELECT aid FROM cpg_albums WHERE category = 5
[21] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 5
[22] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '5' ORDER BY pos
[23] => SELECT aid FROM cpg_albums WHERE category = 6
[24] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 6
[25] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '6' ORDER BY pos
[26] => SELECT aid FROM cpg_albums as a WHERE category = '0'
[27] => SELECT count(*) FROM cpg_albums as a WHERE 1
[28] => SELECT count(*) FROM cpg_pictures as p LEFT JOIN cpg_albums as a ON a.aid=p.aid WHERE 1
[29] => SELECT count(*) FROM cpg_comments as c LEFT JOIN cpg_pictures as p ON c.pid=p.pid LEFT JOIN cpg_albums as a ON a.aid=p.aid WHERE 1
[30] => SELECT count(*) FROM cpg_categories WHERE 1
[31] => SELECT sum(hits) FROM cpg_pictures as p LEFT JOIN cpg_albums as a ON p.aid=a.aid WHERE 1
[32] => SELECT count(*) FROM cpg_albums as a WHERE category = '0'
[33] => SELECT COUNT(*) from cpg_pictures WHERE approved = 'YES'
[34] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, aid FROM cpg_pictures WHERE approved = 'YES' ORDER BY RAND() LIMIT 8
[35] => SELECT COUNT(*) from cpg_pictures WHERE approved = 'YES'
[36] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid,title, caption, owner_id, owner_name, aid FROM cpg_pictures WHERE approved = 'YES' ORDER BY pid DESC LIMIT 0 ,8
)
==========================
GET :
------------------
Array
(
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 4.3.11 - OK
------------------
mySQL version: 4.1.11-standard
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.2.2.1
==========================
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/lib/php:/usr/local/lib/php | .:/usr/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 | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 55M | 55M
==========================
Page generated in 0.065 seconds - 37 queries in 0.008 seconds - Album set :
Upgrade instructions are in the documentation - please read them. Maximum width and height are also explained in the documentation.
If you have a division by zero error, either you have 0 set as a max width/height, or the variable isn't getting the correct value sent to it. Off hand, I'm thinking you have a 0 set somewhere.
You can also turn off error notices in php.ini.