Recent posts Recent posts
 

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]

Main Menu

Recent posts

#1
cpg1.6 upgrading / Re: Constant E_STRICT is depre...
Last post by 406man - January 05, 2025, 06:05:42 PM
Line 95 of include/debugger.inc.php contains the constant E_STRICT in CPG 1.6.26

E_STRICT was deprecated in PHP 8.4
https://php.watch/versions/8.4/E_STRICT-deprecated

Reverting to a slightly older version of PHP will avoid the problem until the CPG code is updated.
#2
cpg1.6 upgrading / Re: Constant E_STRICT is depre...
Last post by phill104 - January 05, 2025, 10:22:04 AM
Which version of CPG are you running
#3
cpg1.6 upgrading / Constant E_STRICT is deprecate...
Last post by AnnieHoney - January 04, 2025, 11:03:31 AM
I'm getting several lines of these on index.php, not on other pages and only when I'm logged in
#4
cpg1.6 upload / Upload Image Size Bugs
Last post by 406man - December 29, 2024, 11:50:49 AM
Several months back I changed some aspects of my gallery which included changing the maximum image size. What I want is for users to upload images that are a particular height or less. Images are not resized to be sure that what users see is what they uploaded. The gallery config doesn't allow me to set a maximum height and width as it's the maximum height that's important. I have to accept any width. I found that both the 1.6.26 single and multiple upload routines fail to validate the image size properly with this combination of config settings.

In more detail, bug 1 is that if the gallery config settings are:
"Auto resize images that are larger than max width or height" is unchecked
and "Use Dimension" is set to either "Height" or "Width"
... the validation works as if "Use Dimension" is set to "Max Aspect".
This means that if I upload an image that's 1600px wide by 1200px high with:
"Use Dimension" set to "Height"
and "Max width or height for uploaded pictures" set to 1200px
...it's rejected because the validation rejects an image that's wider than 1200px. It should ignore the width.
The bug is present when using both the single upload and h5 multiple upload methods.
To fix the bug I've created a new version of picmgmt.inc.php with additional code for a config where images are not resized.

Bug 2 is that the error message that's displayed by the single image uploader when an image is rejected due to being too big is displayed on an ugly blank white screen, not on a proper CPG screen. The error message displayed by the h5 multiple upload is fine.
To fix the bug I've created a new version of uniload.php which has a new section for handling an error in the single upload method. It redirects to the upload screen with a message box showing the error. To avoid having to update the language files the error message for a width that is too large isn't ideal in my updated version and says:
 "The size of file you have uploaded is too large (maximum allowed is Height x 1200)!';

Ideally the error message text in english.php would be changed to:
'The file you have uploaded is too large. Should be: %s  %s px'
...which after substitution looks like:
'The file you have uploaded is too large. Maximum: Height 1200 px'

For reference, the error variable is, in english.php:
$lang_db_input_php['err_fsize_too_large'] = 'The size of file you have uploaded is too large (maximum allowed is %s x %s)!';
Ideally the updated variable would be:
$lang_db_input_php['err_fsize_too_large'] = 'The file you have uploaded is too large. Maximum: %s  %s px'

These changes have been working successfully for several months.

Revised versions of picmgmt.inc.php and uniload.php attached. As the forum doesn't allow me to upload a .php file I've added .txt as a file extension. I haven't changed english.php to avoid any conflicting edits with other changes.

I'm not asking for any support, only to include the fixes in the next release of CPG.
#5
cpg1.6 miscellaneous / Re: Deprecated: Automatic conv...
Last post by phill104 - December 12, 2024, 04:22:16 PM
Please upgrade to the latest 1.6.26 release
#6
cpg1.6 miscellaneous / Deprecated: Automatic conversi...
Last post by Texas-Hunter - December 10, 2024, 10:37:11 PM
Good day All, It's been a minute since I have had to visit you all. I went to my galleries and this lil item popped up on one of my galleries and this is all that is displayed on the other site no files or pictures.. Deprecated: Automatic conversion of false to array is deprecated in /home/****/public_html/gallery/include/debugger.inc.php on line 114 Currently running 1.6.16
#7
cpg1.6 plugins / Re: onlinestats plugin
Last post by ron4mac - December 06, 2024, 05:11:19 PM
Quote from: panhead on December 06, 2024, 12:21:45 PMThat seems to work, thank you!
That change will not likely be in any new version of CPG. Your gallery may have been around a while. Check your Config->General Settings that the timezone difference seems correctly set. If you are in Nederland it should likely be 0 (zero).
#8
cpg1.6 plugins / Re: onlinestats plugin
Last post by panhead - December 06, 2024, 12:21:45 PM
That seems to work, thank you!
#9
cpg1.6 plugins / Re: onlinestats plugin
Last post by ron4mac - December 05, 2024, 06:10:47 PM
Quote from: panhead on December 05, 2024, 04:40:05 PMI installed v2.8 (from github), is there another source?
[ Re-entered my previous post to combat smilies ]
No .. that is the most recent (and necessary) version.

I don't know why it should be failing for you .. PHP version maybe? ( my test bed is using 8.3.14 )

if you can modify a file, you might try making this change to include/functions.inc.php at line(s) 573:
    $timestamp = (INT)$timestamp;
    $timestamp += ((INT)$CONFIG['time_offset'] - $diff_to_GMT) * 3600;
#10
cpg1.6 plugins / Re: onlinestats plugin
Last post by panhead - December 05, 2024, 04:40:05 PM
I installed v2.8 (from github), is there another source?