Fatal error: Allowed memory size of 16777216 bytes exhausted with 1200x1600 Reso Fatal error: Allowed memory size of 16777216 bytes exhausted with 1200x1600 Reso
 

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

Fatal error: Allowed memory size of 16777216 bytes exhausted with 1200x1600 Reso

Started by RolfHeinen, July 30, 2007, 02:47:14 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

RolfHeinen

Hello,
I've read the postings about all the problem's with uploading pictures. But nothing could help. I've read, that a picture with 1200x1600 (high resolution) needs 5,49MB. In my php.ini the memory_limit is 16M. I've resized the picture to 818 x 1125  Pixels; and i can add it to the album. But what is the reason, while the original picture caused the error??
Here the Debug-Iinfo (i hope it helps):

USER:
------------------
Array
(
    [ID] => 72ce54aebd7b5134e6059c02dd6ea839
    [am] => 1
    [lang] => german
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => admin
    [groups] => Array
        (
           
  • => 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
    (
       
  • => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0.053s)
        [1] => select * from cpg1410_plugins order by priority asc; (0.291s)
        [2] => delete from `usr_web45_1`.cpg1410_sessions where time<1185795874 and remember=0; (0.001s)
        [3] => delete from `usr_web45_1`.cpg1410_sessions where time<1184589874; (0.001s)
        [4] => select user_id from `usr_web45_1`.cpg1410_sessions where session_id=md5("5a4b167ae5f9367c2bf1096ea3fdae46951ccb6964bfe2d1758fb3ed1b076cc8"); (0.001s)
        [5] => select user_id as id, user_password as password from `usr_web45_1`.cpg1410_users where user_id=1 (0.001s)
        [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 `usr_web45_1`.cpg1410_users AS u INNER JOIN `usr_web45_1`.cpg1410_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
        [7] => SELECT user_group_list FROM `usr_web45_1`.cpg1410_users AS u WHERE user_id='1' 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 cpg1410_usergroups WHERE group_id in (1) (0.001s)
        [9] => SELECT group_name FROM  cpg1410_usergroups WHERE group_id= 1 (0s)
        [10] => update `usr_web45_1`.cpg1410_sessions set time='1185799474' where session_id=md5('5a4b167ae5f9367c2bf1096ea3fdae46951ccb6964bfe2d1758fb3ed1b076cc8'); (0.002s)
        [11] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 1 (0.001s)
        [12] => DELETE FROM cpg1410_banned WHERE expiry < '2007-07-30 13:44:35' (0.001s)
        [13] => SELECT * FROM cpg1410_banned WHERE (ip_addr='89.13.48.23' OR ip_addr='89.13.48.23' OR user_id=1) AND brute_force=0 (0.001s)
        [14] => SELECT aid, title FROM cpg1410_albums WHERE 1 (0.001s)
        [15] => SELECT COUNT(*) FROM cpg1410_pictures WHERE approved = 'NO' (0.001s)
        [16] => SELECT filepath, filename FROM cpg1410_pictures WHERE filepath LIKE 'uploads/AH/Grillfest 2007%' (0.001s)
        [17] => SELECT aid, title FROM cpg1410_albums WHERE category = 0 (0.001s)
        [18] => SELECT DISTINCT a.aid as aid, a.title as title, c.name as cname FROM cpg1410_albums as a, cpg1410_categories as c WHERE a.category = c.cid AND a.category < '10000' (0s)
        [19] => SELECT aid, CONCAT('(', user_name, ') ', a.title) AS title
                                                            FROM cpg1410_albums AS a
                                                            INNER JOIN `usr_web45_1`.cpg1410_users AS u
                                                            ON category = (10000 + 1) AND user_id = 1 ORDER BY title (0.001s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
        [startdir] => uploads/AH/Grillfest 2007
    )

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

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.4.4 - OK
    ------------------
    mySQL version: 4.0.21-standard-log
    ------------------
    Coppermine version: 1.4.12(stable)
    ==========================
    Module: GD
    ------------------
    GD Version: bundled (2.0.28 compatible)
    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: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 1
    Active Links 2
    Client API version 4.1.22
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib -lmysqlclient 
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Compiled Version 1.2.2.2
    Linked Version 1.2.2.2
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | On | Off
    safe_mode_exec_dir | /var/www/empty/ | no value
    safe_mode_gid | Off | Off
    safe_mode_include_dir | no value | no value
    safe_mode_exec_dir | /var/www/empty/ | no value
    sql.safe_mode | Off | Off
    disable_functions | no value | no value
    file_uploads | On | On
    include_path | . | .:/usr/local/php4/pear
    open_basedir | /var/www/web45/html/:/var/www/web45/phptmp/:/var/www/web45/files/:/var/www/web45/atd/ | 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 | 300 | 300
    max_input_time | 60 | 60
    upload_max_filesize | 16M | 16M
    post_max_size | 16M | 16M
    ==========================
    Page generated in 1.867 seconds - 20 queries in 0.36 seconds - Album set : ; Meta set: ;

Joachim Müller


RolfHeinen

Sorry for giving you to much information without a request (Debug-Info)!
I have read the "Trouble-shooting the upload process -> Fatal error: Allowed memory size of X bytes exhausted" thread before posting that. The permissons are ok (i added a picture successfully in the same album), the memory limit is 16M, so i assumed it must be possible to add a picture with resolution 1600x1200. I can't edit the php.ini, so the "tricks" to resize the images before uploading will work. But i don't want the users of the album to resize their images (beacuse most of them don't know how to do that). And i really want to know the reason why i doesn't work.

Joachim Müller

What other reason do you want to hear, except that you're out of memory?
Restrict the file size users can upload to something that will definitely work if you can't teach your users to resize on their client. Not sure what else to say.

Marking thread as "solved".