Advanced search  

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]

Pages: [1]   Go Down

Author Topic: 1.4.1 (BETA) Can't add certain files - FATAL: emalloc(): Unable to allocate  (Read 3752 times)

0 Members and 1 Guest are viewing this topic.

brainbugnj

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Hey folks - I have several files which I am capable of adding to my 1.3.3 gallery just fine however will not go into my 1.4.1 beta gallery... same machine, same version of php, gd2, etc.... so it has to be the 1.4.1 code somewhere.....when trying to add via the batch add tool or timer.php I get the following in the error logs:

FATAL:  emalloc():  Unable to allocate 2022065190 bytes

I verified that the below was in the HTTP log..
192.168.1.161 - - [19/Jul/2005:22:07:19 -0700] "GET /steveturner/gallery/addpic.php?aid=72&pic_file=RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzYxLmpwZw==&reload=42dddbc4b334d HTTP/1.1" 200 3025872

so we are getting to the addpic but I am not sure where it is going wrong... here is the debug data:
USER:
------------------
Array
(
    [ID] => e86169e08ccaeb72b1af8e3961fa8821
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
  • => 2780
  • [1] => 2781
                [2] => 2782
                [3] => 2783
                [4] => 3247
            )

    )

    ==========================
    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] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [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
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg140_filetypes; (0s)
  • [1] => select * from cpg140_plugins order by priority asc; (0s)
        [2] => delete from `turner_gallery`.cpg140_sessions where time<1121832372 and remember=0; (0s)
        [3] => delete from `turner_gallery`.cpg140_sessions where time<1120626372; (0s)
        [4] => select user_id from `turner_gallery`.cpg140_sessions where session_id=md5("a438f2e16fc6b6ee369b26cfc01445644f709a02073ca48ccfa489e8910bbc92"); (0s)
        [5] => select user_id as id, user_password as password from `turner_gallery`.cpg140_users where user_id=1 (0s)
        [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 `turner_gallery`.cpg140_users AS u INNER JOIN `turner_gallery`.cpg140_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `turner_gallery`.cpg140_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 cpg140_usergroups WHERE group_id in (1) (0s)
        [9] => SELECT group_name FROM  cpg140_usergroups WHERE group_id= 1 (0s)
        [10] => update `turner_gallery`.cpg140_sessions set time='1121835972' where session_id=md5('a438f2e16fc6b6ee369b26cfc01445644f709a02073ca48ccfa489e8910bbc92'); (0s)
        [11] => SELECT user_favpics FROM cpg140_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg140_banned WHERE expiry < '2005-07-20 05:06:12' (0s)
        [13] => SELECT * FROM cpg140_banned WHERE (ip_addr='192.168.1.161' OR ip_addr='192.168.1.161' OR user_id=1) AND brute_force=0 (0s)
        [14] => SELECT aid, title FROM cpg140_albums WHERE 1 (0.001s)
        [15] => SELECT COUNT(*) FROM cpg140_pictures WHERE approved = 'NO' (0.003s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
       
[insert] => 1
)

==========================
POST :
------------------
Array
(
    [d0000] => 72
    [album_lb_id_i0000] => d0000
    [picfile_i0000] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzAwLmpwZw==
    [album_lb_id_i0001] => d0000
    [picfile_i0001] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzAxLmpwZw==
    [album_lb_id_i0002] => d0000
    [picfile_i0002] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzAyLmpwZw==
    [album_lb_id_i0003] => d0000
    [picfile_i0003] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzAzLmpwZw==
    [album_lb_id_i0004] => d0000
    [picfile_i0004] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA0LmpwZw==
    [album_lb_id_i0005] => d0000
    [picfile_i0005] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA1LmpwZw==
    [album_lb_id_i0006] => d0000
    [picfile_i0006] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA2LmpwZw==
    [album_lb_id_i0007] => d0000
    [picfile_i0007] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA3LmpwZw==
    [album_lb_id_i0008] => d0000
    [picfile_i0008] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA4LmpwZw==
    [album_lb_id_i0009] => d0000
    [picfile_i0009] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzA5LmpwZw==
    [album_lb_id_i0010] => d0000
    [picfile_i0010] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzEwLmpwZw==
    [album_lb_id_i0011] => d0000
    [picfile_i0011] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5XzExLmpwZw==
    [pics] => Array
        (
           
  • => i0012
  • [1] => i0025
                [2] => i0027
                [3] => i0040
                [4] => i0044
                [5] => i0061
                [6] => i0067
                [7] => i0073
                [8] => i0087
            )

       <SNIP>
       
[album_lb_id_i0077] => d0000
    [picfile_i0077] => RmFtaWx5L0NhbXMgQnJpZGFsIFNob3dlciAtIEp1bmUgMTgsIDIwMDUgLSAgTmV3IEplcnNleS9DYW1zX0JyaWRhbF9TaG93ZXJfLV9KdW5lXzE4XzIwMDVfLV9OZXdfSmVyc2V5Xzc3LmpwZw==
    [album_lb_id_i0078] => d0000
   <SNIP>)

==========================
VERSION INFO :
------------------
PHP version: 4.4.0 - OK
------------------
mySQL version: 3.23.58
------------------
Coppermine version: 1.4.1(beta)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support:
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 0
Active Links 1
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /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/local/lib/php | .:/usr/local/lib/php
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 | 240 | 240
max_input_time | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.421 seconds - 16 queries in 0.004 seconds - Album set : ; Meta set: ;
« Last Edit: August 09, 2005, 09:17:01 am by GauGau »
Logged

brainbugnj

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Ok - narrowed this down to exif.php function : read_exif_data_raw

I had to comment out the following:
  /*//Check for Interoperability IFD
        if(!isset($result['SubIFD']['ExifInteroperabilityOffset']) || $result['SubIFD']['ExifInteroperabilityOffset']==0) {
                fclose($in);
                fclose($seek);
                return $result;
        }
        //seek to InteroperabilityIFD
        $v = fseek($in,$globalOffset+$result['SubIFD']['ExifInteroperabilityOffset']);
        if($v==-1) {
                $result['Errors'] = $result['Errors']++;
        }

        //===========================================================Start of InteroperabilityIFD
        $num = bin2hex(fread( $in, 2 ));
        if($intel==1) $num = intel2Moto($num);
        $result['InteroperabilityIFDNumTags'] = hexdec($num);


        for($i=0;$i<hexdec($num);$i++) {
          echo "here in read_entry $i".'<br>';
                read_entry($result,$in,$seek,$intel,"InteroperabilityIFD",$globalOffset);
        }
*/

It seems that one of the JEPGS i have is throwing this thing has a strange InteropNumTags..... because on most pics this doesn't fire, some it fires once or twice... on one pic if fire 2900 times... causing the PHP process to run out of memory :(


Any thoughts?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

this is a matter of server setup. Add less files in one go. The additional features in cpg1.4.x consume more memory, this is not an actual error. Marking as "Invalid"
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.