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: file upload larger than 1M fails  (Read 38901 times)

0 Members and 1 Guest are viewing this topic.

glturner

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
file upload larger than 1M fails
« on: August 20, 2010, 05:44:07 am »

fresh install coppermine, file upload larger than 1M fails.  have looked at all the settings on this board to check, nothing has helped.  see attachment for debug information and server settings.  i am trying to upload files larger than 1M and it fails.  have upload many files smaller than 1M with no problem.  MAX_FILE_SIZE in the debug mode shows 1048576 (1MB)

http://gtsrvr.homelinux.com/cpg15x/login.php

login with tester/tester
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: file upload larger than 1M fails
« Reply #1 on: August 20, 2010, 11:43:55 am »

MAX_FILE_SIZE in the debug mode shows 1048576 (1MB)
Increase that value in your PHP config.
Logged

glturner

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: file upload larger than 1M fails
« Reply #2 on: August 20, 2010, 04:48:20 pm »

upload_max_filesize is 4M, i have tried up to 32M.  i have restarted apache every change, no luck.  please look at the zip file i attached.  it has debug, phpinfo, and screenshots of the error.
Logged

glturner

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: file upload larger than 1M fails
« Reply #3 on: August 20, 2010, 05:14:36 pm »

i found the problem.  you need to increase max_upl_size in database table *_config to something larger than 1024.  i changed mine to 2048 (2M) and that worked.  i assume i can change this up to as large as i make upload_max_filesize in php.ini?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: file upload larger than 1M fails
« Reply #4 on: August 20, 2010, 05:47:32 pm »

You don't need to edit the table directly, you can do that through the config panel in Coppermine.

As for increasing the file size, in theory yes but in practice no. You will eventually run into hardware limits or limits imposed by your host. HTTP is also not really designed for file upload so again you will run into limitations of the protocol. For large file you are better off using ftp and the batch add tool. Having said that one of my sites allows uploads of 50Mb without problems probably down to the great hosting I have it on.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

popescucv

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: file upload larger than 1M fails
« Reply #5 on: September 17, 2010, 09:03:59 pm »

I have some problem too.
I ca upload image and files lager than 10Mb (ex.:archive) with no error but I receive an error when I try to upload large movie (.vmw, mov, avi) about over 30Mb.
The files limit is set to 100000KiB.
Debug mode run forever and show me nothing alse then a white page.
My gallery is bridged with a phpBB 3.0 forum.
My gallery link is http://www.campervan.ro/photo/
I create the user tester with the same rights as a registerd user.
Logged

popescucv

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: file upload larger than 1M fails
« Reply #6 on: September 17, 2010, 09:19:04 pm »

I use 1 file to upload and the debug file is that
Code: [Select]
USER:
------------------
Array
(
    [ID] => f98007722776b38cffb4b99a1dea4bbb
    [am] => 1
    [lang] => romanian
    [upload_method] => html_single
)

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

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [access_level] => 3
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg_config [include/init.inc.php:181] (1 ms)
    [1] => SELECT * FROM cpg_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT name, value FROM cpg_bridge [include/functions.inc.php:4415] (0 ms)
    [3] => SELECT user_id, user_password, group_id FROM `camperva_forum`.phpbb_sessions INNER JOIN `camperva_forum`.phpbb_users ON session_user_id = user_id WHERE session_id = 'de60d7db4bcc97e7968ca43afb7fe89f' [bridge/phpbb3.inc.php:131] (0 ms)
    [4] => SELECT u.user_id AS id, u.username AS username, user_password AS password, ug.group_id AS group_id FROM `camperva_forum`.phpbb_users AS u, `camperva_forum`.phpbb_user_group AS ug WHERE u.user_id=ug.user_id AND u.user_id='2' [bridge/udb_base.inc.php:70] (0 ms)
    [5] => 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(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, MAX(access_level) AS access_level, 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) [bridge/udb_base.inc.php:321] (0 ms)
    [6] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:325] (0 ms)
    [7] => SELECT lang_id FROM cpg_languages WHERE enabled='YES' [include/init.inc.php:329] (0 ms)
    [8] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 2 [include/init.inc.php:387] (0 ms)
    [9] => DELETE FROM cpg_mod_online WHERE last_action < NOW() - INTERVAL 3 MINUTE [plugins/onlinestats/codebase.php:123] (0 ms)
    [10] => REPLACE INTO cpg_mod_online (user_id, user_name, user_ip, last_action) VALUES ('2', 'cata', '188.26.176.41', NOW()) [plugins/onlinestats/codebase.php:128] (0 ms)
    [11] => DELETE FROM cpg_banned WHERE expiry < '2010-09-17 15:09:26' [include/init.inc.php:443] (0 ms)
    [12] => SELECT null FROM cpg_banned WHERE (user_id=2 OR '188.26.176.41' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:459] (0 ms)
    [13] => SELECT aid, title, cid, name FROM cpg_albums INNER JOIN cpg_categories ON cid = category WHERE category < 10000 [upload.php:571] (0 ms)
    [14] => SELECT aid, title FROM cpg_albums WHERE category = 0 [upload.php:573] (0 ms)
    [15] => SELECT aid, title FROM cpg_albums WHERE category='10002' ORDER BY title [upload.php:599] (0 ms)
    [16] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' [include/functions.inc.php:2409] (0 ms)
    [17] => SELECT lang_id, abbr FROM cpg_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2331] (0 ms)
    [18] => DELETE FROM cpg_temp_messages WHERE time < 1284746966 [include/functions.inc.php:4911] (0 ms)
    [19] => SELECT cid, parent, name FROM cpg_categories WHERE 1 [upload.php:247] (0 ms)
)

==========================
GET :
------------------
Array
(
    [method] => html_single
)

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

==========================
COOKIE :
------------------
Array
(
    [trafic_h] => 2da5b975bl3c39e455aca8858dc7caa5*1257070919*campervan.ro*1284491104*1284747166*32
    [__utma] => 207660928.1598203580.1257070918.1284491096.1284747164.39
    [__utmz] => 207660928.1284440648.36.2.utmcsr=campervanclub.ro|utmccn=(referral)|utmcmd=referral|utmcct=/contact_us.html
    [trafic_v] => 1
    [__utmb] => 207660928.12.10.1284747164
    [__utmc] => 207660928
    [phpbb3_cm56q_k] =>
    [phpbb3_cm56q_u] => 2
    [phpbb3_cm56q_sid] => de60d7db4bcc97e7968ca43afb7fe89f
    [cpg15x_data] => YTozOntzOjI6IklEIjtzOjMyOiJmOTgwMDc3MjI3NzZiMzhjZmZiNGI5OWExZGVhNGJiYiI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czo4OiJyb21hbmlhbiI7fQ==
)

==========================
VERSION INFO :
------------------
PHP version        5.2.10          OK   
MySQL version      4.1.22-standard OK   
Coppermine version 1.5.8           stable

==========================
Module: GD
------------------
Exact version                    2.0.34                     
GD Version                       bundled (2.0.34 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                         
XPM Support                      1                         
XBM Support                      1                         
JIS-mapped Japanese Font Support                           

==========================
Key config settings
------------------
site_url             http://campervan.ro/photo/                             
charset              utf-8                                                   
allow_private_albums 1                                                       
cookie_name          cpg15x                                                 
cookie_path          /                                                       
impath               /usr/bin/                                               
lang                 english                                                 
main_page_layout     breadcrumb/catlist/alblist/random,2/lastup,2/onlinestats
silly_safe_mode      0                                                       
smtp_host                                                                   
theme                curve                                                   
thumb_method         im                                                     

==========================
Plugins
------------------
Name           Who is online?                                                               
Actions        plugin_install, page_start, plugin_uninstall, plugin_cleanup, plugin_configure
Filters        plugin_block                                                                 
--------------

==========================
Server restrictions
------------------
safe_mode                                                                                                           
safe_mode_exec_dir                                                                                                 
safe_mode_gid                                                                                                       
safe_mode_include_dir                                                                                               
sql.safe_mode                                                                                                       
disable_functions        dl, system, passthru, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status,
file_uploads             1                                                                                         
include_path             .:/usr/lib/php:/usr/local/lib/php                                                         
open_basedir             /home/camperva:/usr/lib/php:/usr/local/lib/php:/tmp                                       
allow_url_fopen                                                                                                     
max_execution_time       30                                                                                         
max_input_time           60                                                                                         
upload_max_filesize      16M                                                                                       
post_max_size            16M                                                                                       
memory_limit             32M                                                                                       
suhosin.post.max_vars    500                                                                                       
suhosin.request.max_vars 500                                                                                       


==========================
Page (performance)
------------------
Parameter        Current  Peak   
Memory usage     2.99 MiB 4.07 MiB
Page generation  74 ms    74 ms   
Page query time  1 ms     1 ms   
Page query count 20       20     


==========================
               

Ofcourse now I observed this : 
Server restrictions
------------------
safe_mode                                                                                                           
safe_mode_exec_dir                                                                                                 
safe_mode_gid                                                                                                       
safe_mode_include_dir                                                                                               
sql.safe_mode                                                                                                       
disable_functions        dl, system, passthru, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status,
file_uploads             1                                                                                         
include_path             .:/usr/lib/php:/usr/local/lib/php                                                         
open_basedir             /home/camperva:/usr/lib/php:/usr/local/lib/php:/tmp                                       
allow_url_fopen                                                                                                     
max_execution_time       30                                                                                         
max_input_time           60                                                                                         
upload_max_filesize      16M                                                                                       
post_max_size            16M                                                                                       
memory_limit             32M                                                                                       
suhosin.post.max_vars    500                                                                                       
suhosin.request.max_vars 500 
Logged

popescucv

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: file upload larger than 1M fails
« Reply #7 on: September 17, 2010, 09:24:45 pm »

?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: file upload larger than 1M fails
« Reply #8 on: September 17, 2010, 09:33:23 pm »

We have a few rules on the forum to help everyone. One of those is for you not to hijack others threads but to start your own. Please resect that.

As for your problem the above applies, you are running into server restrictions that in all likelyhood you can do nothing about. The limit at the top is what you have set (and way too high IMO). The script cannot take into account the server side restrictions. If you cannot get those changed then your only option, as stated in many threads before including this one, is to upload via ftp and use batch add.

Please review the board rules - http://forum.coppermine-gallery.net/index.php/topic,55415.0.html

Locking
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.