Upload large files to 1and1 fails Upload large files to 1and1 fails
 

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

Upload large files to 1and1 fails

Started by atleastbehandy, September 07, 2006, 06:51:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

atleastbehandy

Hello, I have tried the troubleshooting steps from the FAQ. However, I still cannot upload large images (3072x2304) created with a Canon PowerShot SD500. Re-sized pictures work fine (2048x1536)

My config:
Max size for uploaded files (KB) = 40960
Max width or height for uploaded pictures/videos (pixels) = 3500
Auto resize... = no

Here is my php.ini:

memory_limit = 256M;
post_max_size = 40M
upload_max_filesize = 40M;
max_execution_time = 50000;
max_input_time = 600


Here is the error message:

Critical error
The file 'albums/userpics/10001/2005-09-09_001~0.JPG' can't be inserted in the album

The image you have uploaded is corrupted or can't be handled by the GD library

File: /homepages/37/d100428368/htdocs/snyder/db_input.php - Line: 402



and here is the Debug Info:

USER:
------------------
Array
(
    [ID] => 2bf1d33a1d6948757064a5517687e7ac
    [am] => 1
    [lang] => english
    [liv] => Array
        (
            [0] => 823
            [1] => 825
        )

)

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

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 1
    [num_URI_upload] => 0
    [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] => 0
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg149_filetypes; (0.004s)
    [1] => select * from cpg149_plugins order by priority asc; (0.001s)
    [2] => delete from `db176605081`.cpg149_sessions where time<1157643025 and remember=0; (0.023s)
    [3] => delete from `db176605081`.cpg149_sessions where time<1156437025; (0.008s)
    [4] => select user_id from `db176605081`.cpg149_sessions where session_id=md5("cd04ca5781dd14f4de23f67936ab1fc1bea6e7891211f9ac5cf9860dd2db3fa6"); (0s)
    [5] => select user_id as id, user_password as password from `db176605081`.cpg149_users where user_id=1 (0.004s)
    [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 `db176605081`.cpg149_users AS u INNER JOIN `db176605081`.cpg149_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
    [7] => SELECT user_group_list FROM `db176605081`.cpg149_users AS u WHERE user_id='1' and user_group_list <> ''; (0.001s)
    [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.003s)
    [9] => SELECT group_name FROM  cpg149_usergroups WHERE group_id= 1 (0.003s)
    [10] => update `db176605081`.cpg149_sessions set time='1157646625' where session_id=md5('cd04ca5781dd14f4de23f67936ab1fc1bea6e7891211f9ac5cf9860dd2db3fa6'); (0.001s)
    [11] => SELECT user_favpics FROM cpg149_favpics WHERE user_id = 1 (0.097s)
    [12] => DELETE FROM cpg149_banned WHERE expiry < '2006-09-07 11:30:26' (0.007s)
    [13] => SELECT * FROM cpg149_banned WHERE (ip_addr='67.70.64.35' OR ip_addr='67.70.64.35' OR user_id=1) AND brute_force=0 (0.002s)
    [14] => SELECT category FROM cpg149_albums WHERE aid='4' (0.001s)
    [15] => SELECT COUNT(*) FROM cpg149_pictures WHERE approved = 'NO' (0.011s)
)

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

==========================
POST :
------------------
Array
(
    [album] => 4
    [MAX_FILE_SIZE] => 41943040
    [title] =>
    [caption] =>
    [keywords] =>
    [event] => picture
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.4 - OK
------------------
mySQL version: 4.0.27-standard-log
------------------
Coppermine version: 1.4.9(stable)
==========================
Module: GD
------------------
GD Version: 2.0 or higher
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
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.25
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.1
Linked Version 1.2.1
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | /usr/local/php/bin | /usr/local/php/bin
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /usr/local/php/bin | /usr/local/php/bin
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 | 50000 | 50000
max_input_time | 600 | 600
upload_max_filesize | 40M | 40M
post_max_size | 40M | 40M
==========================
Page generated in 1.904 seconds - 16 queries in 0.167 seconds - Album set : ; Meta set: ;

atleastbehandy

SOLVED

I tried installing ImageMagick as per: http://www.photopost.com/magicknoroot-php.html

but that did not work either. However, it gave me "mogrify" which can batch resize all images in a directory. Here are the steps:

1. Backup original photos: "~/coppermine/albums/tar -cvf photos.tar 2004_vacation"
2. Resize photos: "~/coppermine/albums/2004_vacation/mogrify -size 800x600 *.JPG"
3. Batch add files in Coppermine
4. Restore original photos: ""~/coppermine/albums/tar -xvf photos.tar"
5. From "Coppermine > Admin Tools" run "Reload file dimensions and size information" on the album

Takes a while to process (I have ~1000 photos per album) but it works!