Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 24   Go Down

Author Topic: Captcha (Visual Confirmation) for adding comments  (Read 586506 times)

0 Members and 2 Guests are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Captcha (Visual Confirmation) for adding comments
« Reply #160 on: October 11, 2006, 05:06:20 am »

I doubt that your pagination issue is related to using this mod, but rather the bug discussed here: "thumbnail page navigation - no image counter" :-\
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Captcha (Visual Confirmation) for adding comments
« Reply #161 on: October 11, 2006, 07:11:51 am »

GauGau is right, this mod requires only comments template to be modified. So no chance of tabs getting distorted because of it.

Another possibility is that you might have made some mistake while modifying the theme file. If the thread referred by GauGau does not solve your issue then try re-applying the mod from scratch. I hope you have the backups of the modified files.
Logged
Chief Geek at Ranium Systems

wfs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
Re: Captcha (Visual Confirmation) for adding comments
« Reply #162 on: October 11, 2006, 08:41:04 am »

Thank you so much, GauGau and Abbas.
I applied the extra % as discussed in the thread referred to by GauGau.
Problem resolved !!!

Thank you guys AGAIN !!
Logged

wirewolf

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 35
    • Ship Modeling Forum
Re: Captcha (Visual Confirmation) for adding comments
« Reply #163 on: October 15, 2006, 09:34:14 pm »

Abbas. great mod! Do you know if anyone has applied this mod to ecards?
John

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Captcha (Visual Confirmation) for adding comments
« Reply #164 on: October 16, 2006, 07:07:34 am »

afaik No.
Logged
Chief Geek at Ranium Systems

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
« Last Edit: October 19, 2006, 08:20:26 am by GauGau »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Sosha

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Captcha (Visual Confirmation) for adding comments
« Reply #166 on: October 19, 2006, 08:31:03 pm »

fantastic stuff, worked perfectly first time, cheers
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Captcha (Visual Confirmation) for adding comments
« Reply #167 on: October 21, 2006, 01:06:15 pm »

Hi,

I have made the modifications as described here, but the picture with the code is not vissible
Can you tell me what to do ?

Regards

Cees

http://www.ceesjoore.nl/coppermine/index.php
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Captcha (Visual Confirmation) for adding comments
« Reply #168 on: October 22, 2006, 01:49:17 am »

I run the classic vertical filmstrip theme, but since that did not contain the pieces of code that needed changing
i used the sample theme.php and edited it accordingly. I edited db_input.php and english.php and dutch.php
I upload the captcha.php to the root of the album along with the fonts dir. Uploaded captcha.class.php to the include folder.

When i now click on a picture i do get a extra box saying Confirmation but there are no images beside it.
When i go the captcha.php file directly i get this error:
Code: [Select]
Cannot redeclare class phpcaptcha in /home/fototest/public_html/include/captcha.class.php on line 14
I read this post from front to back and again from back to front but found no clue. Can someone point me in the right direction ?

Thanks
Hein
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Captcha (Visual Confirmation) for adding comments
« Reply #169 on: October 22, 2006, 07:27:08 am »

Post a link to your gallery would be helpful (turn on debug)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

dke

  • Guest
Re: Captcha (Visual Confirmation) for adding comments
« Reply #170 on: October 22, 2006, 12:07:08 pm »

ive added everything as in this thread, i get everything up and running, but it dosnt matter if i actually put anything into confirmation code or not, or what i put into confirmation code. Comments still work for everyone even if you type the wrong confirmation code, what might i have missed? Using mac_ox_x theme
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Captcha (Visual Confirmation) for adding comments
« Reply #171 on: October 22, 2006, 12:13:20 pm »

ive added everything as in this thread, i get everything up and running, but it dosnt matter if i actually put anything into confirmation code or not, or what i put into confirmation code. Comments still work for everyone even if you type the wrong confirmation code, what might i have missed? Using mac_ox_x theme
Are you sure you edited db_input.php as instructed?
Logged

dke

  • Guest
Re: Captcha (Visual Confirmation) for adding comments
« Reply #172 on: October 22, 2006, 12:29:27 pm »

Youre right,

i searched for if (!(USER_CAN_POST_COMMENTS)) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);

and added the code directly after it, but there were 2 cases of "if (!(USER_CAN_POST_COMMENTS)) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);" the second one was the right one :) thanks!

Lovely mod but looks really bad in my theme, anyone have any ideas on how to make it look good with mac_ox_x theme, this is how it looks now: http://dkeserver.mine.nu/displayimage.php?pos=-148968

big thanks to Abbas Ali for this lovely mod, i hate that bot spam!
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Captcha (Visual Confirmation) for adding comments
« Reply #173 on: October 22, 2006, 05:33:33 pm »

Hi,

I have made the modifications as described here, but the picture with the code is not vissible
Can you tell me what to do ?

Regards

Cees

http://www.ceesjoore.nl/coppermine/index.php

Tried everything no result yet ?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Captcha (Visual Confirmation) for adding comments
« Reply #174 on: October 22, 2006, 05:48:08 pm »

If you view the file directly, there is no image: http://www.ceesjoore.nl/coppermine/captcha.php

If it worked, you would see the confirmation image. I don't know if it would help, but in Config enable debug mode and see if you get a helpful error message.

If you want help, help the helpers by making it easier on them. I saw your post yesterday but disregarded it since it meant I would have to look around your site for an example. Next time, try to post a more direct url to save everybody's time.
Logged

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Captcha (Visual Confirmation) for adding comments
« Reply #175 on: October 22, 2006, 06:39:24 pm »

If you view the file directly, there is no image: http://www.ceesjoore.nl/coppermine/captcha.php

If it worked, you would see the confirmation image. I don't know if it would help, but in Config enable debug mode and see if you get a helpful error message.

If you want help, help the helpers by making it easier on them. I saw your post yesterday but disregarded it since it meant I would have to look around your site for an example. Next time, try to post a more direct url to save everybody's time.

It never worked, it is not working on any of the pictures so my site is filled with examples.
So here is a link to 1 picture http://www.ceesjoore.nl/coppermine/displayimage.php?album=32&pos=11

All i get is a red cross by the confirmation code.
I have put on the debugging mode on for everybody to see, But all the code it is generating is not making any sense to me.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Captcha (Visual Confirmation) for adding comments
« Reply #176 on: October 22, 2006, 06:57:49 pm »

Login as an admin and check if GD with Freetype is enabled under debug output
Logged
‍I don't answer to PM with support question
Please post your issue to related board

ceesjoore

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Captcha (Visual Confirmation) for adding comments
« Reply #177 on: October 22, 2006, 08:55:11 pm »

Login as an admin and check if GD with Freetype is enabled under debug output

@Sami,
When i check PHPINFO.php i see this:
 GD Support  enabled 
GD Version  bundled (2.0.28 compatible) 
FreeType Support  enabled 
FreeType Linkage  with TTF library 
FreeType Version  1.3 

I have put debug output on and this is what i see right now /include/themes.inc.php
Notice line 2196: Undefined index: uid
Notice line 2280: Undefined variable: report_tgt
Notice line 1899: Undefined index: uid
/themes/hardwired/theme.php
Notice line 312: Undefined index: confirm

Is that what you asked ?
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Captcha (Visual Confirmation) for adding comments
« Reply #178 on: October 25, 2006, 11:04:30 am »

Post a link to your gallery would be helpful (turn on debug)

Stupid of me. Thanks ;)

Link is fototest.scouting.nl

I still get
Code: [Select]
Fatal error: Cannot redeclare class phpcaptcha in /home/fototest/public_html/include/captcha.class.php on line 14when i call captcha.php directly. I added the sample theme.php and copy/pasted the needed blocks of code into the theme.php of my classic vertical filmstrip theme.php. Also edited db_input.php correctly and edited both english.php and dutch.php. It now displays a confirmation text box below the picture, but no captcha image. If i now try to add comment and click ok i also get the above error message.

The Debug message:
Code: [Select]
USER:
------------------
Array
(
    [ID] => 3507a8f716313a02bc913f96ef5a91bd
    [am] => 1
    [lang] => dutch
    [liv] => Array
        (
            [0] => 12
            [1] => 11
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 3
    [user_name] => skildery
    [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] => 1
    [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; (0s)
    [1] => select * from cpg149_plugins order by priority asc; (0s)
    [2] => delete from `fototest`.cpg149_sessions where time<1161763315 and remember=0; (0s)
    [3] => delete from `fototest`.cpg149_sessions where time<1160557315; (0s)
    [4] => select user_id from `fototest`.cpg149_sessions where session_id=md5("d63c83078b683a3e6b526b8b4400eaa2b8a101053b889122d0f118067ff35962"); (0s)
    [5] => select user_id as id, user_password as password from `fototest`.cpg149_users where user_id=3 (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 `fototest`.cpg149_users AS u INNER JOIN `fototest`.cpg149_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='3' (0s)
    [7] => SELECT user_group_list FROM `fototest`.cpg149_users AS u WHERE user_id='3' 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) (0s)
    [9] => SELECT group_name FROM  cpg149_usergroups WHERE group_id= 1 (0s)
    [10] => update `fototest`.cpg149_sessions set time='1161766915' where session_id=md5('d63c83078b683a3e6b526b8b4400eaa2b8a101053b889122d0f118067ff35962'); (0s)
    [11] => SELECT user_favpics FROM cpg149_favpics WHERE user_id = 3 (0s)
    [12] => SHOW TABLES LIKE 'cpg149_cms_config' (0s)
    [13] => SELECT * FROM cpg149_cms_config (0s)
    [14] => SELECT * FROM cpg149_final_extract_config (0s)
    [15] => SELECT * FROM cpg149_mark_users WHERE user_id = 3 (0s)
    [16] => SELECT * FROM cpg149_mark_config (0s)
    [17] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [18] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [19] => SELECT * from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 1 ,1 (0s)
    [20] => SELECT * FROM cpg149_mark_users WHERE user_id = 3 (0s)
    [21] => SELECT pid FROM cpg149_mark_watermark WHERE pid = 12 (0s)
    [22] => DELETE FROM cpg149_banned WHERE expiry < '2006-10-25 10:01:55' (0s)
    [23] => SELECT * FROM cpg149_banned WHERE (ip_addr='81.69.50.110' OR ip_addr='81.69.50.110' OR user_id=3) AND brute_force=0 (0s)
    [24] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [25] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [26] => SELECT * from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 1 ,1 (0s)
    [27] => SELECT title, comments, votes, category, aid FROM cpg149_albums WHERE aid='3' LIMIT 1 (0s)
    [28] => SELECT name, parent FROM cpg149_categories WHERE cid = '7' (0s)
    [29] => SELECT cid, name, parent FROM cpg149_categories WHERE cid = '4' (0s)
    [30] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM cpg149_comments WHERE pid='12' ORDER BY msg_id ASC (0s)
    [31] => SELECT COUNT(*) FROM cpg149_pictures WHERE approved = 'NO' (0s)
    [32] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [33] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [34] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 0 ,10 (0s)
    [35] => SELECT count(*) from cpg149_comments where pid=11 and msg_id!=0 (0s)
    [36] => SELECT count(*) from cpg149_comments where pid=12 and msg_id!=0 (0s)
    [37] => SELECT * FROM cpg149_cms WHERE conid='12' AND type='2' ORDER BY cpos (0s)
)

==========================
GET :
------------------
Array
(
    [album] => 3
    [pos] => 1
)

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

==========================
VERSION INFO :
------------------
PHP version: 4.3.10-16 - OK
------------------
mySQL version: 4.1.11-Debian_4sarge7-log
------------------
Coppermine version: 1.4.9(stable)
==========================
Module: GD
------------------
GD Version: 2.0 or higher
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support:
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.0.24
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | /usr/share/php | 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/share/php:/usr/share/pear | .:/usr/share/php:/usr/share/pear
open_basedir | /home/fototest/public_html:/usr/share/php:/tmp | 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.103 seconds - 38 queries in 0 seconds - Album set : ; Meta set: ;
« Last Edit: October 25, 2006, 11:32:30 am by Hein »
Logged

jenkinl1302

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Captcha (Visual Confirmation) for adding comments
« Reply #179 on: October 25, 2006, 02:07:47 pm »

I originally had the same problems as some on this board with the captcha image not showing up.  Something with GD.  Actually, it prevented me from using any gallery software until I figured it out.  GD wasn't available until I asked for it (in code).  On captcha.php, try adding
Code: [Select]
dl("gd.so"); immediately before
Code: [Select]
define("IN_COPPERMINE", true);
I'm not sure if there's a better way to do this, or if it will work for everyone, but it seemed to make things work for me.
Logged
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 24   Go Up
 

Page created in 0.052 seconds with 20 queries.