Permanant watermark with undo possibility (GD2+IMagick) - Page 2 Permanant watermark with undo possibility (GD2+IMagick) - Page 2
 

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

Permanant watermark with undo possibility (GD2+IMagick)

Started by Stramm, March 26, 2005, 06:09:36 PM

Previous topic - Next topic

0 Members and 9 Guests are viewing this topic.

Stramm

then the pic's found but can't be accessed. That's server setup issues. If you're not afraid of commandline you probably can fix it yourself. A test if it's what I think is just to upload the watermark image through coppermine... then change the watermark path to the uploaded image.. test. If it's working then your host or you should chown the watermark pic.

lancefiasco

Quote from: Stramm on April 04, 2005, 08:56:22 AM
A test if it's what I think is just to upload the watermark image through coppermine... then change the watermark path to the uploaded image..
Also does not work.

Could an .htaccess file have anything to do with this?

Stramm

nope, the script is accessing the file directly, not using the webserver

lancefiasco

Now that I've tested that, where should I go from here?

I'm having some major problems SSH'ing...

Stramm

you could tell me exactly what you do, what error message comes up. Enable debugging...
Is it an error that coppermine gives (embedded in coppermine layout) or is it different...

where and when and what does tell you 'forbidden'

no ssh is a pity too. I'll post some code later so that you can test IM and it's composite function.

lancefiasco

#25
I do not get a forbidden error at all.

The only error message I experience is "No watermark..."

Notice: Undefined offset: 2 in /home/gcfiasco/public_html/upload.php on line 250

Notice: Undefined offset: 3 in /home/gcfiasco/public_html/upload.php on line 256

Notice: Undefined offset: 4 in /home/gcfiasco/public_html/upload.php on line 256

Notice: Undefined variable: file_failure_array in /home/gcfiasco/public_html/upload.php on line 1940

Notice: Undefined variable: URI_failure_array in /home/gcfiasco/public_html/upload.php on line 1941

Notice: Undefined variable: zip_failure_array in /home/gcfiasco/public_html/upload.php on line 1942

Watermark file not found or no image!!

File: /home/gcfiasco/public_html/include/picmgmt.inc.php - Line: 185

Notice: Undefined index: user1 in /home/gcfiasco/public_html/upload.php on line 2146

Notice: Undefined index: user2 in /home/gcfiasco/public_html/upload.php on line 2147

Notice: Undefined index: user3 in /home/gcfiasco/public_html/upload.php on line 2148

Notice: Undefined index: user4 in /home/gcfiasco/public_html/upload.php on line 2149

Notice: Undefined index: center in /home/gcfiasco/public_html/include/media.functions.inc.php on line 51

I will try to revert to a backed up upload.php, and then re-mod that.  I've had a feeling that I did something wrong in the coding from all along.  I should have just checked sooner.

Also, I read that watermark can be in the center, but this also warrants an error.  What do I need to set this as?

Stramm

something is definitely worng.. but it's not upload php. The modded files are delete.php (so that you can delete the backup files as well), util.php (same reason, that the backup files get included when doing batch stuff), picmgmt.inc.php (here's the watermark stuff, so when you upload, that file gets called... and when a pic gets resized then it'll get a watermark applied as well) and finally the english.php file. That's all.

So if upload spits out errors... not that good

lancefiasco

I'm just having so many problems for some reason.  Is there anyway you can send the files premoded?  Is that even allowed?

Stramm

Why shouldn't it be allowed... but I've heavily modded my version. VBulletin style PM system, additional tags for the template, shoutbox, massmailer, lots of style changes, bunch of mysql additions and whatever


Stramm

your lucky day... I've just seen that I still have my test version. Only the watermark mod's applied there. PM me your email addy if you want to have it

lancefiasco

I got your files...still doesn't work :(

Notice: Undefined index: wm_resized in /home/gcfiasco/public_html/config.php on line 411 (when I run config.php)

Notice: Undefined index: startpic in /home/gcfiasco/public_html/util.php on line 139 (when I run util.php)

...as well as the other errors I mentioned before..

Stramm

these errors don't mind... check it out on your local win box. It's working smooth there I bet... I've tested on two win machines, on FreeBSD and a Redhat box. Works everywhere. As said, I guess it's some weird permission/ group stuff your host's setup for security reasons. If you still haven't asked support you should do so.

lancefiasco

I don't even know if my ImageMagick is working correctly because I just set a Coppermine up on another account and it gave me a permission error.

I have ImageMagick enabled in the configuration, but how can I tell if I am actually using it?

Stramm

if ImageMagick is configured this will spit out all supported formats

<?php
exec 
("convert -list format"$return);
foreach(
$return as $out) { 
echo 
"$out<br>";
}
?>


freesouljah

I am having the same problems.....


I tried all the fixes mentioned in the previous posts and am still getting errors.

I am running cpg 1.3.2 bridged w/ phpbb 2.13 on an apache (I have shh access)

my watermark is a .png file (chmod 777) and can be found here and its path in config.php is: /home/staticp/public_html/photos/images/watermark.png

:-\\

here is the error it sends me when I attempt to upload a single photo w/ the watermark

QuoteWatermark file not found or no image!!

File: /home/staticp/public_html/photos/include/picmgmt.inc.php - Line: 188



Notice: Undefined index: user1 in /home/staticp/public_html/photos/upload.php on line 2146

Notice: Undefined index: user2 in /home/staticp/public_html/photos/upload.php on line 2147

Notice: Undefined index: user3 in /home/staticp/public_html/photos/upload.php on line 2148

Notice: Undefined index: user4 in /home/staticp/public_html/photos/upload.php on line 2149
Source: albums/userpics/10004/orig_Picture1~1.jpg --- Destination: albums/userpics/10004/thumb_Picture1~1.jpg
Source: albums/userpics/10004/orig_Picture1~1.jpg --- Destination: albums/userpics/10004/normal_Picture1~1.jpg

Notice: Undefined index: bottomright in /home/staticp/public_html/photos/include/media.functions.inc.php on line 51



line 51 in media.functions.inc.php is:

   if (!is_null($filter) && $FILE_TYPES[$filename[$EOA]]['content']==$filter)



in case you need it, here is my debug info:

USER:
------------------
Array
(
   [ID] => 4e852da6faa5c227c3908eb58b711d41
   [am] => 1
   [liv] => Array
       (
           [0] => 4
           [1] => 13
           [2] => 7
           [3] => 18
           [4] => 19
       )

   [search] => assssss
)

==========================
USER DATA:
------------------
Array
(
   [0] => 4
   [user_id] => 4
   [1] => buffalo soulJAH
   [user_name] => buffalo soulJAH
   [2] => 1
   [user_level] => 1
   [groups] => Array
       (
           [0] => 1
           [1] => 2
           [2] => 1761
           [3] => 7035
       )

   [group_quota] => 0
   [can_rate_pictures] => 1
   [can_send_ecards] => 1
   [can_post_comments] => 1
   [can_upload_pictures] => 1
   [can_create_albums] => 1
   [pub_upl_need_approval] => 0
   [priv_upl_need_approval] => 0
   [upload_form_config] => 3
   [num_file_upload] => 5
   [num_URI_upload] => 3
   [custom_user_upload] => 0
   [disk_max] => 1024
   [disk_min] => 0
   [ufc_max] => 3
   [ufc_min] => 0
   [has_admin_access] => 1
   [group_name] => Administrators
   [can_see_all_albums] => 1
   [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   [0] => SELECT extension, mime, content FROM cpg132_filetypes;
   [1] => SELECT user_id, username as user_name, user_level FROM phpbb_sessions INNER JOIN phpbb_users ON session_user_id = user_id WHERE session_id='0d649a19bf69a3aed5ac368ac28ff960' AND session_user_id ='4' AND user_active='1'
   [2] => SELECT (ug.group_id + 5) as group_id FROM phpbb_user_group as ug LEFT JOIN phpbb_groups as g ON ug.group_id = g.group_id WHERE user_id = 4 AND user_pending = 0 AND group_single_user = 0
   [3] => 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,2,1761,7035)
   [4] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
   [5] => DELETE FROM cpg132_banned WHERE expiry < 1113332433
   [6] => SELECT * FROM cpg132_banned WHERE ip_addr='65.40.255.161' OR ip_addr='65.40.255.161' OR user_id=4
   [7] => SELECT category FROM cpg132_albums WHERE aid='1'
)

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

==========================
POST :
------------------
Array
(
   [album] => 1
   [title] => test
   [caption] => test
   [keywords] => test
   [control] => phase_2
   [unique_ID] => b9842480
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.0.22-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.1.4
==========================
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 | 90 | 90
max_input_time | -1 | -1
upload_max_filesize | 25M | 25M
post_max_size | 100M | 100M
==========================
Page generated in 1.19 seconds - 8 queries in 0.004 seconds - Album set :



thanks in advance  8)

freesouljah

#37
Quote from: GauGau on April 14, 2005, 09:43:19 AM
search the board for the error messages you get; they're not related to the watermarking hack. Please do not reply to this thread about the error you get, as the discussion would clutter this unrelated thread. Always make sure your install is working before applying a hack. Once you fixed those error messages and uploads are working as expected, re-apply this hack and turn to this thread if the hack itself doesn't work for you.

Joachim

sorry  :-[  it was working until I tried to get the watermark hack going....so I just figured that was the problem...thanks for your help.


the Watermark file not found or no image!! error is still there though


Joachim Müller

search the board for the error messages you get; they're not related to the watermarking hack. Please do not reply to this thread about the error you get, as the discussion would clutter this unrelated thread. Always make sure your install is working before applying a hack. Once you fixed those error messages and uploads are working as expected, re-apply this hack and turn to this thread if the hack itself doesn't work for you.

Joachim

bangerkcknbck

#39
Quoteso let's start

first the necessary SQL
Code:
insert into cpg_config (name, value) values ('enable_watermark', '1');
insert into cpg_config (name, value) values ('where_put_watermark', 'bottomright');
insert into cpg_config (name, value) values ('watermark_file', '/your/full/path/to/logo.png');
insert into cpg_config (name, value) values ('which_files_to_watermark', 'both');
insert into cpg_config (name, value) values ('orig_pfx', 'orig_');
insert into cpg_config (name, value) values ('watermark_transparency', '0');
insert into cpg_config (name, value) values ('watermark_transparency_featherx', '0');
insert into cpg_config (name, value) values ('watermark_transparency_feathery', '0');

Okay so I guess I'm just not getting this..... I've figured out that I have to go into the /coppermine/sql folder and insert this into one of the files... but I'm not sure what one to modify (if it even matters).  I have the choice of basic, schema, and update sql files...

Anyone have an idea what one is supposed to get the code above?

Okay so I gave it a go figuring I've got a recent backup and nothing I can do but learn from this.

I updated basic.sql with the code from above and modified the rest of the files per this thread.  When I try to do a single picture upload I get these errors after placing it into an album:

Warning: imagesx(): supplied argument is not a valid Image resource in /usr/local/apache2/htdocs/Levanger/coppermine/include/picmgmt.inc.php on line 245

Warning: imagesy(): supplied argument is not a valid Image resource in /usr/local/apache2/htdocs/Levanger/coppermine/include/picmgmt.inc.php on line 246

Warning: imagecolorat(): supplied argument is not a valid Image resource in /usr/local/apache2/htdocs/Levanger/coppermine/include/picmgmt.inc.php on line 269

Warning: imagecolortransparent(): supplied argument is not a valid Image resource in /usr/local/apache2/htdocs/Levanger/coppermine/include/picmgmt.inc.php on line 269

Warning: imagecopymerge(): supplied argument is not a valid Image resource in /usr/local/apache2/htdocs/Levanger/coppermine/include/picmgmt.inc.php on line 270

In my coppermine config I'm set to
GD2
Watermark Yes
Center
Both
/images/watermark.png (I have also tried /usr/local/apache2/htdocs/Levanger/coppermine/images/watermark.png).

Any suggestions?