CPG refuses to upload some files CPG refuses to upload some files
 

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

CPG refuses to upload some files

Started by avedianj, March 14, 2005, 03:35:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

avedianj

I have uploaded almost 200 pics, of those approximately 15-20 have decided not to display. I am not using batch add as there is a problem with that which I have not yet worked out. So, I have set the number of file uploads at a time to be 10. Frequently all 10 will say they uploaded successfully, however when I click the button to continue and it brings the data entry window for each indivitual file (name, description, thumbnail etc.) the thumbnail for some of those files don't display, it is a white box with a little red "x" in it. The rest come through fine. Of course even if I try to place the file anyway the file doesn't exist. I have gone through the manual, and the forum, and unless I missed something by accident (which I apologize for in advance) I don't think there is any information on it. In config I have the allowed file types set as "ALL" and the size of upload at "200000". There aren't any resricted characters in the file names either. The file types are .jpg or JPEG - as I believe they are called. What am I missing? Below the debug is pasted. Hope someone can help! :-\\

USER:
------------------
Array
(
    [ID] => 9d4eeb7daeefe0627a3930722bdf0426
    [am] => 1
    [lap] => 2
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => avedianj
    [user_password] => ********
    [user_lastvisit] => 2005-03-13 10:27:00
    [user_regdate] => 2005-02-03 20:22:00
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] => East Lansing, Michigan, USA
    [user_interests] => My beautiful wife Arevik, Anything and Everything Armenian, Studies of the Potential for Armenian Revolution, Genealogy, Small Animals (rodent family - ie. Squirrels, Guinea Pigs)
    [user_occupation] => Student, Business owner
    [user_actkey] =>
    [user_favpics] =>
    [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] => 10
    [num_URI_upload] => 2
    [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
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg132_filetypes;
        [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '8eb3dc15fe92281acd7c81392796023d'
        [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 cpg132_usergroups WHERE group_id in (1)
        [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
        [4] => DELETE FROM cpg132_banned WHERE expiry < 1110767696
        [5] => SELECT * FROM cpg132_banned WHERE ip_addr='35.11.32.60' OR ip_addr='35.11.32.60' OR user_id=1
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
        [unique_ID] => 77be97d0
        [control] => phase_2
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.6 - OK
    ------------------
    mySQL version: 4.1.7
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    GD Support enabled
    GD Version bundled (2.0.22 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    T1Lib Support enabled
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled
    JIS-mapped Japanese Font Support enabled
    ==========================
    Module: mysql
    ------------------
    Active Persistent Links 0
    Active Links 1
    Client API version 4.0.18
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /tmp/mysql.sock
    MYSQL_INCLUDE -I/usr/local/include/mysql
    MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient 
    ==========================
    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 | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    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 | 8M | 8M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 1.745 seconds - 6 queries in 0.043 seconds - Album set :

nukeworker

Do any of them have an "&" in the file name?  Thatr userd to cause me trouble, so I added it to the list of forbidden characters.

avedianj

Thanks for the suggestion but no there are no symbols whatsoever in the filename. Any other ideas?

Joachim Müller

enable debug mode for everyone in config (with notices turned off), then go to "groups" and change "method for uploading files" to "Single file uploads only" for all relevant groups, then try again - should give you a detailed error message.
Posting a link and non-admin test user account with upload privileges might help as well.

Quote from: avedianj on March 14, 2005, 03:35:43 AM
[...] and the size of upload at "200000"[...]
Don't use silly settings, try one that actually matches the max size your server can handle. If not sure, set it to 1 MB for now and only test with small, known good files temporarily.

Joachim

avedianj

Ok, I did exactly that - except changed the upload size - which I didn't think was silly - I know how upset the administrators of this forum get when someone hasn't exhausted every possibility before coming to them - and I thought that perhaps the files were too big (I will have to find out the max size from the server and then change it) - I am still learning, sorry.

Anyway, I setup an account with upload.

User: test
Pass: test

site: http://photos.armenianancestry.com

Finally, here is the debug report:

USER:
------------------
Array
(
   [ID] => 9d4eeb7daeefe0627a3930722bdf0426
   [am] => 1
   [lap] => 2
)

==========================
USER DATA:
------------------
Array
(
   [user_id] => 1
   [user_group] => 1
   [user_active] => YES
   [user_name] => avedianj
   [user_password] => ********
   [user_lastvisit] => 2005-03-14 04:29:36
   [user_regdate] => 2005-02-03 20:22:00
   [user_group_list] =>
   [user_email] =>
   [user_website] =>
   [user_location] => East Lansing, Michigan, USA
   [user_interests] => My beautiful wife Arevik, Anything and Everything Armenian, Studies of the Potential for Armenian Revolution, Genealogy, Small Animals (rodent family - ie. Squirrels, Guinea Pigs)
   [user_occupation] => Student, Business owner
   [user_actkey] =>
   [user_favpics] =>
   [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] => 1
   [num_URI_upload] => 1
   [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
   [groups] => Array
       (
           [1] => 1
       )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg132_filetypes;
       [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '8eb3dc15fe92281acd7c81392796023d'
       [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 cpg132_usergroups WHERE group_id in (1)
       [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
       [4] => DELETE FROM cpg132_banned WHERE expiry < 1110803654
       [5] => SELECT * FROM cpg132_banned WHERE ip_addr='35.11.32.60' OR ip_addr='35.11.32.60' OR user_id=1
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
       [unique_ID] => 3c88dcd4
       [control] => phase_2
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.6 - OK
    ------------------
    mySQL version: 4.1.7
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    GD Support enabled
    GD Version bundled (2.0.22 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    T1Lib Support enabled
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled
    JIS-mapped Japanese Font Support enabled
    ==========================
    Module: mysql
    ------------------
    Active Persistent Links 0
    Active Links 1
    Client API version 4.0.18
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /tmp/mysql.sock
    MYSQL_INCLUDE -I/usr/local/include/mysql
    MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient  
    ==========================
    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 | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    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 | 8M | 8M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 1.364 seconds - 6 queries in 0.007 seconds - Album set :

Joachim Müller

I was able to upload just fine - see http://photos.armenianancestry.com/index.php/displayimage.php?pos=-227 (although you didn't set the upload method to "Single file uploads only" as I suggested). I'm not sure what your problem is then - maybe it's client-sided, or you're trying to upload pics that are too large or corrupt. Try known-good, small jpeg files, without special chars in the file name and the extension in lower case.
Do as I suggested now and then try to upload. Post what error messages you get (if any).

Joachim

avedianj

Alright, as I said - only about 1/10 pictures have this problem - so it isn't a surprise that you had success with the first and only one you tried. I did set the number of uploads from 10 to 1 (which I think means the same as "single file uploads only" - as I searched the config panel and didn't see any other such option). By following the link below you can find a wedding picture which I know for a fact failed to upload on several occasions including right before posting this reply. Please feel free to give it a try. If you would like me to post more pictures which fail to upload just let me know.

http://www.armenianancestry.com/wedding.jpg

Here is the debug for the most recent attempt:

USER:
------------------
Array
(
    [ID] => 9d4eeb7daeefe0627a3930722bdf0426
    [am] => 1
    [lap] => 2
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => avedianj
    [user_password] => ********
    [user_lastvisit] => 2005-03-14 04:29:36
    [user_regdate] => 2005-02-03 20:22:00
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] => East Lansing, Michigan, USA
    [user_interests] => My beautiful wife Arevik, Anything and Everything Armenian, Studies of the Potential for Armenian Revolution, Genealogy, Small Animals (rodent family - ie. Squirrels, Guinea Pigs)
    [user_occupation] => Student, Business owner
    [user_actkey] =>
    [user_favpics] =>
    [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] => 1
    [num_URI_upload] => 1
    [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
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg132_filetypes;
        [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '8eb3dc15fe92281acd7c81392796023d'
        [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 cpg132_usergroups WHERE group_id in (1)
        [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
        [4] => DELETE FROM cpg132_banned WHERE expiry < 1110823976
        [5] => SELECT * FROM cpg132_banned WHERE ip_addr='35.11.32.60' OR ip_addr='35.11.32.60' OR user_id=1
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
        [unique_ID] => d5c7b0af
        [control] => phase_2
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.6 - OK
    ------------------
    mySQL version: 4.1.7
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    GD Support enabled
    GD Version bundled (2.0.22 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    T1Lib Support enabled
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled
    JIS-mapped Japanese Font Support enabled
    ==========================
    Module: mysql
    ------------------
    Active Persistent Links 0
    Active Links 1
    Client API version 4.0.18
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /tmp/mysql.sock
    MYSQL_INCLUDE -I/usr/local/include/mysql
    MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient 
    ==========================
    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 | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear | .:/php/includes:/usr/local/share/pear:/usr/local/lib/php/pear
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    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 | 8M | 8M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 1.716 seconds - 6 queries in 0.163 seconds - Album set :

Joachim Müller

Quote from: avedianj on March 14, 2005, 07:15:51 PM
Here is the debug for the most recent attempt:
No need to post debug info unless a supporter requests it.

Quote from: avedianj on March 14, 2005, 07:15:51 PM
I did set the number of uploads from 10 to 1 (which I think means the same as "single file uploads only" - as I searched the config panel and didn't see any other such option).
This is not an option in "config", I told you to go to the "groups" page - review my posting and do as I suggested, I won't be able to help you if you don't follow my advice. Limiting the number of upload fields to "1" is not the same!

Joachim


avedianj

Sorry for the mixup. Here is the critical error I just got after trying:

The file 'albums/userpics/10001/Minasian Wedding.jpg' can't be inserted in the album
Error executing ImageMagick - Return value: 188
Cmd line :
/usr/local/bin/convert -quality 80 -antialias -geometry 125x100 'albums/userpics/10001/Minasian Wedding.jpg' 'albums/userpics/10001/thumb_Minasian Wedding.jpg'
The convert program said:
/usr/local/bin/convert: Memory allocation failed (UnableToAllocateCacheInfo) [Invalid argument].
File: /usr/local/psa/home/vhosts/armenianancestry.com/httpdocs/photos.armenianancestry.com/db_input.php - Line: 304

Joachim Müller

Pretty obvious: the pic is too large (file size and / or dimensions) to be added using your current server setup. If you're self-hosted, assign more memory to the process. If you're webhosted, ask you webhost for support or stop uploading such huge files (or use GD if you have it). The error you get is not "created" by coppermine, but the image library in use (ImageMagick). Nothing you can do about it from the "coppermine point of view".

Joachim