Fatal Error when HTTP uploading or batch FTP uploading Fatal Error when HTTP uploading or batch FTP uploading
 

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 when HTTP uploading or batch FTP uploading

Started by NITRO1250, June 25, 2006, 10:11:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NITRO1250

I have a 20 GB server and I am getting a Fatal Error message when I do an HTTP upload. I also get the same error message when I batch upload through FTP (and I am putting them in the right place too!). Now, the images I am uploading are no bigger than 11 mb for 13 images. Only 2 images will show up and when I delete the album/images from the database AND server and reupload everything, the SAME TWO IMAGES can only be seen. Just before I am to allow the images to be put into the album (after the place where you can choose which images you want in the album from the folder), I get 2 oks (same images every time) and the rest have a box with a smaller box that has a red "X" in it. I never had this problem before and I am not sure how to fix it. The skin/template I am using is the WOODY template. Website is http://alabamahuntclub.com/gallery (for the direct link to the gallery). Hosting service is Powweb (400 GB transfer monthly with 20 GB hosting space). I am the only one that can upload images. Please help! Thanks in advance! I can't figure this out!

NOTE: I realize that there is a solution above this post that configures the php.ini file. I have edited the php.ini file and made the changes like in the FAQ, but it still won't work. I set the file size limit to "32M", but that still dosen't seem to fix the problem. I also made sure that the correct permissions where set to either 755 or 777 and they were all set to 755 for the ones which the FAQ suggested.

Here is the Fatal Error message:

Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 8192 bytes) in /hermes/web03/b553/pow.alabamahuntclub/htdocs/gallery/include/picmgmt.inc.php on line 259


where line 259 is this:  $src_img = imagecreatefromjpeg($src_file);




Ok, here is the information from the debug area:

USER:
------------------
Array
(
    [ID] => 7215d5577ecf2dd76f3155e4cab9200e
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => NITRO
    [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 cpg_filetypes; (0s)
        [1] => select * from cpg_plugins order by priority asc; (0s)
        [2] => delete from `alabamahuntc_coppermine1`.cpg_sessions where time<1151261769 and remember=0; (0s)
        [3] => delete from `alabamahuntc_coppermine1`.cpg_sessions where time<1150055769; (0s)
        [4] => select user_id from `alabamahuntc_coppermine1`.cpg_sessions where session_id=md5("d7aaf2d44b57e09280905c1dfc115c03106cfec5954bb54f177227143878c8d8"); (0s)
        [5] => select user_id as id, user_password as password from `alabamahuntc_coppermine1`.cpg_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 `alabamahuntc_coppermine1`.cpg_users AS u INNER JOIN `alabamahuntc_coppermine1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `alabamahuntc_coppermine1`.cpg_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 cpg_usergroups WHERE group_id in (1) (0s)
        [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
        [10] => update `alabamahuntc_coppermine1`.cpg_sessions set time='1151265369' where session_id=md5('d7aaf2d44b57e09280905c1dfc115c03106cfec5954bb54f177227143878c8d8'); (0s)
        [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg_banned WHERE expiry < '2006-06-25 15:56:09' (0s)
        [13] => SELECT * FROM cpg_banned WHERE (ip_addr='68.66.169.90' OR ip_addr='68.66.169.90' OR user_id=1) AND brute_force=0 (0s)
        [14] => SELECT aid, title FROM cpg_albums WHERE 1 (0s)
        [15] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
        [d0000] => 5
        [pics] => Array
            (
               
  • => i0000
                [1] => i0001
                [2] => i0002
                [3] => i0003
                [4] => i0004
                [5] => i0005
                [6] => i0006
                [7] => i0007
                [8] => i0008
                [9] => i0009
                [10] => i0010
                [11] => i0011
                [12] => i0012
            )

        [album_lb_id_i0000] => d0000
        [picfile_i0000] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwMS5qcGc=
        [album_lb_id_i0001] => d0000
        [picfile_i0001] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwNC5qcGc=
        [album_lb_id_i0002] => d0000
        [picfile_i0002] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwNS5qcGc=
        [album_lb_id_i0003] => d0000
        [picfile_i0003] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwNi5qcGc=
        [album_lb_id_i0004] => d0000
        [picfile_i0004] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwNy5qcGc=
        [album_lb_id_i0005] => d0000
        [picfile_i0005] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwOC5qcGc=
        [album_lb_id_i0006] => d0000
        [picfile_i0006] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYwOS5qcGc=
        [album_lb_id_i0007] => d0000
        [picfile_i0007] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxMC5qcGc=
        [album_lb_id_i0008] => d0000
        [picfile_i0008] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxMS5qcGc=
        [album_lb_id_i0009] => d0000
        [picfile_i0009] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxMi5qcGc=
        [album_lb_id_i0010] => d0000
        [picfile_i0010] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxNC5qcGc=
        [album_lb_id_i0011] => d0000
        [picfile_i0011] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxNS5qcGc=
        [album_lb_id_i0012] => d0000
        [picfile_i0012] => KFdvcmtfUGFydHkpLUp1bmUtMjUtMjAwNi9JTTAwMDYxNi5qcGc=
        [insert] => Insert selected files
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.4.2 - OK
    ------------------
    mySQL version: 4.1.18-standard-log
    ------------------
    Coppermine version: 1.4.3(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 0
    Active Links 1
    Client API version 5.0.21
    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.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-4.4.2/lib/php | .:/usr/local/lib/php-4.4.2/lib/php
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | wwwuser@cgi.yourhostingaccount.com | wwwuser@cgi.yourhostingaccount.com
    sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
    SMTP | mail.yourhostingaccount.com | mail.yourhostingaccount.com
    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 | 10M | 10M
    post_max_size | 11M | 11M
    ==========================
    Page generated in 0.604 seconds - 16 queries in 0 seconds - Album set : ; Meta set: ;

NITRO1250


Nibbler

There is a sticky for this error message, please search the board before posting.

http://forum.coppermine-gallery.net/index.php?topic=5843.0

Either upload smaller files (by resizing before you upload), increase the memory limit, or try IM.

NITRO1250

I found that article which is exactly the one in the FAQ above in this area of the forum. As I put in the NOTE in the top post, I set it to a much higher limit than the required one to see if it would work and still nothing. And, I would not have posted a message unless I could not have figured out the problem because I know you developers have lives too!  :)

Nibbler

Read the message - your memory limit is 12582912 bytes (12M) which is not enough for the pics you are uploading.

NITRO1250

Another thing, when I manually upload the images (only 2 images for test totaling only about 1.4MB) from the HTTP file uploader thingy, it says that 2 images were added, but when I hit "continue", I get taken to a blank page (blank as in just plain white with no text anywhere), which is the upload.php page. I am really stumped.

Here is what my resource limits part of my php.ini file reads: (note, it was default on 32M, I increased it to 64M, but that didn't work either)

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M      ; Maximum amount of memory a script may consume (8MB)

Nibbler


NITRO1250

Information that phpinfo.php gave me:

PHP Version 4.4.2

System  Linux cgi0802.int.bizland.net 2.4.32-grsec #1 Fri Mar 17 12:22:27 EST 2006 i686 
Build Date  Jun 19 2006 20:15:07 
Configure Command  './configure' '--prefix=/usr/local/lib/php-4.4.2' '--without-apache' '--with-mysql=/usr' '--with-gd' '--with-jpeg-dir=/root/src/jpeg-6b/' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--disable-debug' '--enable-discard-path' '--enable-inline-optimization' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-memory-limit' '--with-regex=system' '--with-zlib' '--enable-ftp' '--enable-sockets' '--enable-magic-quotes' '--with-gettext' '--enable-wddx' '--with-gdbm' '--with-db4' '--with-freetype-dir=/usr' '--with-curl=curl-7.15.3' '--with-mhash' '--enable-xslt' '--with-xslt-sablot=/usr/local/lib' '--enable-calendar' '--with-mcve' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-iconv' '--with-xmlrpc' '--with-mcrypt' '--with-bzip2' '--with-ming' '--with-pspell' '--with-openssl' '--with-ttf' '--with-freetype-dir=/usr/local' '--enable-gd-native-ttf' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--enable-exif' '--enable-bcmath' '--enable-dbase' 
Server API  CGI 


There is alot more, but this is just the top part. If you need something specific, I can post that too. Thanks for the help.
Virtual Directory Support  disabled 
Configuration File (php.ini) Path  /usr/local/lib/php-4.4.2/lib/php.ini 
PHP API  20020918 
PHP Extension  20020429 
Zend Extension  20050606 
Debug Build  no 
Zend Memory Manager  enabled 
Thread Safety  disabled 
Registered PHP Streams  php, http, ftp, https, ftps, compress.zlib 

Nibbler

You don't need to post anything, just scroll down and check the value for the memory limit.

NITRO1250


Nibbler

Right, so you need to learn how to change php settings. Make sure you edited the correct php.ini file (again by checking the phpinfo) and then restart apache. Also update your gallery.

NITRO1250

Yeah, I need to update my gallery. Apparently tech support told me the wrong place to put my php.ini file. I am currently complaining in the tech support chat room right now. Thanks for your help!

NOTE: don't get me wrong, I am not slandering powweb at all, that are an excellent hosing service for the price and reliablity.

NITRO1250

Ok, I am having another problem. I found out that when my website was migrated to the new hosting platform, I can no longer put in user created php.ini files; powweb has to custom edit it for me. I have upped the max file size for php uploads to 14MB. Now for the problem: when I did a test today to upload 1 file (less than 900kb), I got the message saying that 1 file was successfully uploaded and that I should hit continue to post it. I hit continue and all I get is a blank webpage (upload.php). Now what? Any help would be much appreciated! Thanks in advance!!!

Here is the debug console output just before I hit the 'continue' button:

USER:
------------------
Array
(
    [ID] => 4742d3e92e20eb9b349a2bb54f2197c5
    [am] => 1
    [lang] => english
    [liv] => Array
        (
            [0] => 6
            [1] => 4
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => NITRO
    [groups] => Array
        (
            [0] => 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
(
    [0] => SELECT extension, mime, content, player FROM cpg_filetypes; (0.004s)
    [1] => select * from cpg_plugins order by priority asc; (0s)
    [2] => delete from `alabamahuntc_coppermine1`.cpg_sessions where time<1152798952 and remember=0; (0s)
    [3] => delete from `alabamahuntc_coppermine1`.cpg_sessions where time<1151592952; (0s)
    [4] => select user_id from `alabamahuntc_coppermine1`.cpg_sessions where session_id=md5("642d620c45646998c7eb615d304c00dd3b640c8a4554a5ca5b6b13f9d8d383de"); (0.015s)
    [5] => select user_id as id, user_password as password from `alabamahuntc_coppermine1`.cpg_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 `alabamahuntc_coppermine1`.cpg_users AS u INNER JOIN `alabamahuntc_coppermine1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `alabamahuntc_coppermine1`.cpg_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 cpg_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
    [10] => update `alabamahuntc_coppermine1`.cpg_sessions set time='1152802552' where session_id=md5('642d620c45646998c7eb615d304c00dd3b640c8a4554a5ca5b6b13f9d8d383de'); (0s)
    [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
    [12] => DELETE FROM cpg_banned WHERE expiry < '2006-07-13 10:55:52' (0s)
    [13] => SELECT * FROM cpg_banned WHERE (ip_addr='68.66.169.90' OR ip_addr='68.66.169.90' OR user_id=1) AND brute_force=0 (0s)
    [14] => SELECT aid, title FROM cpg_albums WHERE category < 10000 ORDER BY title (0.001s)
    [15] => SELECT aid, title FROM cpg_albums WHERE category='10001' ORDER BY title (0s)
    [16] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
    [17] => SELECT unique_ID FROM cpg_temp_data (0.001s)
    [18] => INSERT INTO cpg_temp_data VALUES ('00206bdc', 'YToxOntpOjA7YToyOntzOjExOiJhY3R1YWxfbmFtZSI7czoxMjoiSU0wMDA2MDEuanBnIjtzOjE0OiJ0ZW1wb3JhcnlfbmFtZSI7czoyMzoibUhUVFBfdGVtcF84NGUyODI4Yi5qcGciO319', '1152802552') (0.003s)
)

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

==========================
POST :
------------------
Array
(
    [URI_array] => Array
        (
            [0] =>
            [1] =>
            [2] =>
        )

    [control] => phase_1
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.2 - OK
------------------
mySQL version: 4.1.18-standard-log
------------------
Coppermine version: 1.4.3(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 0
Active Links 1
Client API version 5.0.21
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.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-4.4.2/lib/php | .:/usr/local/lib/php-4.4.2/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | wwwuser@cgi.yourhostingaccount.com | wwwuser@cgi.yourhostingaccount.com
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | mail.yourhostingaccount.com | mail.yourhostingaccount.com
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 | 10M | 10M
post_max_size | 11M | 11M
==========================
Page generated in 0.315 seconds - 19 queries in 0.024 seconds - Album set : ; Meta set: ;