error 404 from uploading error 404 from uploading
 

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

error 404 from uploading

Started by Gravity, May 25, 2010, 02:19:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gravity

Hi,

I've just installed cpg1.5.3 RC on my Centos 5.4 dedicated server, with MySQL 5.0.90-community, Apache version 2.2.15, PHP version 5.2.13, with GD2. URL is http://pwnwear.com/gallery

It's working. I've uploaded files (see working-gallery file).
However when I try to upload a larger jpg file, I get an error 404 (see attached).

I have directory permissions set to 777 as required.
Install fresh (never used this software before, done by hand not Fantastico).
No bridging.
Client Windows 7 64 bit, browser Chrome.
English language.

The file I tried to upload is hosted here if you wanted to check it.
http://static.pwnwear.com/temp/WoWScrnShot_052010_201627.jpg

onthepike

Check your php.ini settings. You might need to modify the max upload values. Otherwise, you and I have somewhat similar configurations, with the exception of your 777 CHMOD. Try changing it to 755. Also, is there any difference using batch vs single file upload?

You should post a test (non-admin) user account for us to test uploads.

As you can see, I had no problem uploadimng that image on my testbed:


onthepike

Also, please see the section on requesting upload support and post back using the template provided.

Lastly, you should have posted this message under the forum.coppermine-gallery.net > Support > cpg1.5.x Support > cpg1.5 upload > sub-forum as opposed to the forum.coppermine-gallery.net > Dev Board > cpg1.5 Testing/Bugs > sub-forum.

Gravity

I changed permissions to 755.
I reviewed the 'uploading trouble-shooting' file, thanks for that. It was not obvious to find that help file from the docs section on alpha/beta testing.
I changed settings to simple, and tried to upload again with the simple interface. It worked this time.

The succesful debug info is below, in case that is useful.
USER:
------------------
Array
(
    [ID] => 0a8e78bff017ccda77479b3291c8398e
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Gravity
    [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 cpg15x_config [include/init.inc.php:177] (0 ms)
    [1] => SELECT * FROM cpg15x_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT user_id, time FROM `icecrown_gallery`.cpg15x_sessions WHERE session_id = '69ca957951931f0245eb44c7bdf08bc6' [bridge/coppermine.inc.php:258] (0 ms)
    [3] => SELECT user_id, user_password FROM `icecrown_gallery`.cpg15x_users WHERE user_id = 1 [bridge/coppermine.inc.php:270] (0 ms)
    [4] => SELECT u.user_id AS id, u.user_name AS username, user_password AS password, u.user_group AS group_id FROM `icecrown_gallery`.cpg15x_users AS u LEFT JOIN `icecrown_gallery`.cpg15x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' [bridge/udb_base.inc.php:72] (0 ms)
    [5] => SELECT user_group_list FROM `icecrown_gallery`.cpg15x_users AS u WHERE user_id='1' AND user_group_list <> '' [bridge/coppermine.inc.php:200] (0 ms)
    [6] => 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 cpg15x_usergroups WHERE group_id in (1) [bridge/udb_base.inc.php:323] (0 ms)
    [7] => SELECT group_name FROM  cpg15x_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:327] (0 ms)
    [8] => SELECT lang_id FROM cpg15x_languages WHERE enabled='YES' [include/init.inc.php:318] (0 ms)
    [9] => SELECT user_favpics FROM cpg15x_favpics WHERE user_id = 1 [include/init.inc.php:376] (0 ms)
    [10] => DELETE FROM cpg15x_banned WHERE expiry < '2010-05-25 01:38:32' [include/init.inc.php:432] (0 ms)
    [11] => SELECT null FROM cpg15x_banned WHERE (user_id=1 OR '124.168.149.75' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:448] (0 ms)
    [12] => SELECT aid FROM cpg15x_pictures AS p WHERE pid='4'  LIMIT 1 [displayimage.php:326] (0 ms)
    [13] => SELECT title, keyword FROM cpg15x_albums WHERE aid = 1 [include/functions.inc.php:2298] (0 ms)
    [14] => SELECT COUNT(*) FROM cpg15x_pictures WHERE ((aid='1'  ) )  [include/functions.inc.php:1222] (0 ms)
    [15] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id, pic_raw_ip, pic_hdr_ip FROM cpg15x_pictures AS r
                    WHERE ((aid = 1  ) )
                    ORDER BY filename ASC
                     [include/functions.inc.php:1253] (0 ms)
    [16] => SELECT title, comments, votes, category, aid FROM cpg15x_albums WHERE aid='1' LIMIT 1 [displayimage.php:427] (0 ms)
    [17] => SELECT extension, mime, content, player FROM cpg15x_filetypes [include/functions.inc.php:5732] (0 ms)
    [18] => SELECT pic_id FROM cpg15x_votes WHERE pic_id=4 AND user_md5_id='c4ca4238a0b923820dcc509a6f75849b' [include/themes.inc.php:3649] (16 ms)
    [19] => SELECT user_name as user_name FROM `icecrown_gallery`.cpg15x_users WHERE user_id = '1' [bridge/udb_base.inc.php:256] (0 ms)
    [20] => SELECT COUNT(msg_id) FROM cpg15x_comments WHERE pid='4' [include/themes.inc.php:3778] (5 ms)
    [21] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title FROM cpg15x_pictures AS r
                    WHERE ((aid = 1  ) )
                    ORDER BY filename ASC
                     LIMIT 0 ,2 [include/functions.inc.php:1253] (0 ms)
    [22] => SELECT COUNT(*) FROM cpg15x_pictures WHERE approved = 'NO' [include/functions.inc.php:2366] (0 ms)
    [23] => SELECT lang_id, abbr FROM cpg15x_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2314] (0 ms)
    [24] => SELECT message FROM cpg15x_temp_messages  WHERE message_id = 'af7cff163941261656d36ecef6c30b48' LIMIT 1 [include/functions.inc.php:4835] (0 ms)
    [25] => DELETE FROM cpg15x_temp_messages WHERE message_id = 'af7cff163941261656d36ecef6c30b48' [include/functions.inc.php:4846] (0 ms)
    [26] => DELETE FROM cpg15x_temp_messages WHERE time < 1274762313 [include/functions.inc.php:4867] (0 ms)
)

==========================
GET :
------------------
Array
(
    [pid] => 4
    [message_id] => af7cff163941261656d36ecef6c30b48
    [message_icon] => info
)

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

==========================
COOKIE :
------------------
Array
(
    [__qca] => P0-1520787165-1272021387550
    [66775eeeb52c6a43905f956e36c4e69a] => 1a76d3663a599df9f1c2f325ca003436
    [wordpress_logged_in_d1ea22d6f30adeed52841a1326a64b95] => Gravity|1274914309|420be6b849268f0179c43be6f2c59a6d
    [phpbb3_4ophc_u] => 2
    [phpbb3_4ophc_k] => ca6f2c67ee36a704
    [phpbb3_4ophc_sid] => 81ad22e75323dc03c9c0b3c547be95c4
    [logintheme] => cpanel
    [cprelogin] => no
    [cpsession] => 2xLex02_zkamnECq_BhEK2nXbDSS3ARyBP0HEAl1SGrQAcOQKflHCcdCOzU5gwJK
    [wp-settings-63] => m6=o&m5=o&editor=tinymce&m0=o&m1=o&m4=o&hidetb=1&m2=o&m9=o&align=center&m8=o&imgsize=full&m7=o&uploader=1
    [wp-settings-time-63] => 1274747700
    [__utmz] => 167082687.1274763143.1.1.utmcsr=murmur.pwnwear.com|utmccn=(referral)|utmcmd=referral|utmcct=/support/
    [style_cookie] => printonly
    [__utma] => 167082687.2042050081.1274763143.1274763143.1274763143.1
    [__utmc] => 167082687
    [__utmb] => 167082687.6.10.1274763143
    [cpg15x_data] => YTozOntzOjI6IklEIjtzOjMyOiIwYThlNzhiZmYwMTdjY2RhNzc0NzliMzI5MWM4Mzk4ZSI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjt9
)

==========================
VERSION INFO :
------------------
PHP version        5.2.13           OK
MySQL version      5.0.90-community OK
Coppermine version 1.5.3            RC

==========================
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://pwnwear.com/gallery/                 
charset              utf-8                                       
allow_private_albums 1                                           
cookie_name          cpg15x                                     
cookie_path          /                                           
impath                                                           
lang                 english                                     
main_page_layout     breadcrumb/catlist/alblist/random,2/lastup,2
silly_safe_mode      0                                           
smtp_host                                                       
theme                curve                                       
thumb_method         gd2                                         

==========================
Plugins
------------------

==========================
Server restrictions
------------------
safe_mode                                                 
safe_mode_exec_dir                                       
safe_mode_gid                                             
safe_mode_include_dir                                     
sql.safe_mode                                             
disable_functions                                         
file_uploads             1                               
include_path             .:/usr/lib/php:/usr/local/lib/php
open_basedir                                             
allow_url_fopen          1                               
max_execution_time       30                               
max_input_time           60                               
upload_max_filesize      2M                               
post_max_size            8M                               
memory_limit             32M                             
suhosin.post.max_vars                                     
suhosin.request.max_vars                                 


==========================
Page (performance)
------------------
Parameter        Current  Peak   
Memory usage     2.74 MiB 4.31 MiB
Page generation  397 ms   397 ms 
Page query time  21 ms    21 ms   
Page query count 27       27     


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


So then I switched back to advanced mode, using the onscreen toggle (user side).
I get the 404 error again.
Here is the debug info from that failed page.
USER:
------------------
Array
(
    [ID] => 0a8e78bff017ccda77479b3291c8398e
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

    [upload_method] => swfupload
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Gravity
    [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 cpg15x_config [include/init.inc.php:177] (0 ms)
    [1] => SELECT * FROM cpg15x_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT user_id, time FROM `icecrown_gallery`.cpg15x_sessions WHERE session_id = '69ca957951931f0245eb44c7bdf08bc6' [bridge/coppermine.inc.php:258] (0 ms)
    [3] => SELECT user_id, user_password FROM `icecrown_gallery`.cpg15x_users WHERE user_id = 1 [bridge/coppermine.inc.php:270] (0 ms)
    [4] => SELECT u.user_id AS id, u.user_name AS username, user_password AS password, u.user_group AS group_id FROM `icecrown_gallery`.cpg15x_users AS u LEFT JOIN `icecrown_gallery`.cpg15x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' [bridge/udb_base.inc.php:72] (0 ms)
    [5] => SELECT user_group_list FROM `icecrown_gallery`.cpg15x_users AS u WHERE user_id='1' AND user_group_list <> '' [bridge/coppermine.inc.php:200] (0 ms)
    [6] => 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 cpg15x_usergroups WHERE group_id in (1) [bridge/udb_base.inc.php:323] (0 ms)
    [7] => SELECT group_name FROM  cpg15x_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:327] (0 ms)
    [8] => SELECT lang_id FROM cpg15x_languages WHERE enabled='YES' [include/init.inc.php:318] (0 ms)
    [9] => SELECT user_favpics FROM cpg15x_favpics WHERE user_id = 1 [include/init.inc.php:376] (0 ms)
    [10] => DELETE FROM cpg15x_banned WHERE expiry < '2010-05-25 01:43:36' [include/init.inc.php:432] (0 ms)
    [11] => SELECT null FROM cpg15x_banned WHERE (user_id=1 OR '124.168.149.75' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:448] (0 ms)
    [12] => SELECT aid, title, cid, name FROM cpg15x_albums INNER JOIN cpg15x_categories ON cid = category WHERE category < 10000 [upload.php:573] (0 ms)
    [13] => SELECT aid, title FROM cpg15x_albums WHERE category = 0 [upload.php:575] (0 ms)
    [14] => SELECT aid, title FROM cpg15x_albums WHERE category='10001' ORDER BY title [upload.php:601] (0 ms)
    [15] => SELECT user_id AS user_id, user_password AS pass_hash FROM `icecrown_gallery`.cpg15x_users WHERE user_id = '1' [bridge/udb_base.inc.php:732] (0 ms)
    [16] => SELECT COUNT(*) FROM cpg15x_pictures WHERE approved = 'NO' [include/functions.inc.php:2366] (0 ms)
    [17] => SELECT lang_id, abbr FROM cpg15x_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2314] (0 ms)
    [18] => DELETE FROM cpg15x_temp_messages WHERE time < 1274762616 [include/functions.inc.php:4867] (0 ms)
    [19] => SELECT cid, parent, name FROM cpg15x_categories WHERE 1 [upload.php:249] (0 ms)
)

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

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

==========================
COOKIE :
------------------
Array
(
    [__qca] => P0-1520787165-1272021387550
    [66775eeeb52c6a43905f956e36c4e69a] => 1a76d3663a599df9f1c2f325ca003436
    [wordpress_logged_in_d1ea22d6f30adeed52841a1326a64b95] => Gravity|1274914309|420be6b849268f0179c43be6f2c59a6d
    [phpbb3_4ophc_u] => 2
    [phpbb3_4ophc_k] => ca6f2c67ee36a704
    [phpbb3_4ophc_sid] => 81ad22e75323dc03c9c0b3c547be95c4
    [logintheme] => cpanel
    [cprelogin] => no
    [cpsession] => 2xLex02_zkamnECq_BhEK2nXbDSS3ARyBP0HEAl1SGrQAcOQKflHCcdCOzU5gwJK
    [wp-settings-63] => m6=o&m5=o&editor=tinymce&m0=o&m1=o&m4=o&hidetb=1&m2=o&m9=o&align=center&m8=o&imgsize=full&m7=o&uploader=1
    [wp-settings-time-63] => 1274747700
    [__utmz] => 167082687.1274763143.1.1.utmcsr=murmur.pwnwear.com|utmccn=(referral)|utmcmd=referral|utmcct=/support/
    [style_cookie] => printonly
    [__utma] => 167082687.2042050081.1274763143.1274763143.1274763143.1
    [__utmc] => 167082687
    [__utmb] => 167082687.6.10.1274763143
    [cpg15x_data] => YTo0OntzOjI6IklEIjtzOjMyOiIwYThlNzhiZmYwMTdjY2RhNzc0NzliMzI5MWM4Mzk4ZSI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YTowOnt9fQ==
    [PHPSESSID] => ba44bbe72f288d91380b452c0aa5a0a1
)

==========================
SESSION :
------------------
Array
(
    [php_captcha] => 7ce6130e0f5540e94159fec0cf325155
)

==========================
VERSION INFO :
------------------
PHP version        5.2.13           OK
MySQL version      5.0.90-community OK
Coppermine version 1.5.3            RC

==========================
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://pwnwear.com/gallery/                 
charset              utf-8                                       
allow_private_albums 1                                           
cookie_name          cpg15x                                     
cookie_path          /                                           
impath                                                           
lang                 english                                     
main_page_layout     breadcrumb/catlist/alblist/random,2/lastup,2
silly_safe_mode      0                                           
smtp_host                                                       
theme                curve                                       
thumb_method         gd2                                         

==========================
Plugins
------------------

==========================
Server restrictions
------------------
safe_mode                                                 
safe_mode_exec_dir                                       
safe_mode_gid                                             
safe_mode_include_dir                                     
sql.safe_mode                                             
disable_functions                                         
file_uploads             1                               
include_path             .:/usr/lib/php:/usr/local/lib/php
open_basedir                                             
allow_url_fopen          1                               
max_execution_time       30                               
max_input_time           60                               
upload_max_filesize      2M                               
post_max_size            8M                               
memory_limit             32M                             
suhosin.post.max_vars                                     
suhosin.request.max_vars                                 


==========================
Page (performance)
------------------
Parameter        Current  Peak   
Memory usage     2.91 MiB 4.37 MiB
Page generation  298 ms   298 ms 
Page query time  0 ms     0 ms   
Page query count 20       20     


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


I have now created a test account, per instructions.
Username: tester
password: tester

Again tried to upload a similar screenshot file via advanced method and got the same error.
This should now be replicable.

Joachim Müller

Uploading a small file works as expected (see http://pwnwear.com/gallery/displayimage.php?pid=6).
I don't get a 404 not found when uploading a large file. Instead, I get the expected behaviour when running into a time-out or server-sided limitation: I get a blank screen on http://pwnwear.com/gallery/db_input.php

Quote from: Gravity on May 25, 2010, 07:57:04 AMThe succesful debug info is below, in case that is useful.
Please don't post debug output unless a supporter explicitly asks for it!

onthepike

Quote from: Joachim Müller on May 25, 2010, 08:37:45 AM
Uploading a small file works as expected [...]

Not for me which leads me to believe this may be a flash-specific issue related to either the local PC or the browser (or a combination of these). However, on my local testbed, using the same machine and browser, flash uploads worked perfectly. Which contradicts my previous opinion. Meaning, if it were a flash issue and/or a browser issue, it would fail on my testbed as it did on the website above. Unless it's a security issue or a permissions issue on the OP's end. Server-side obviously. Or some issue that's web-only (as my flash-driven CPG runs via WAMP).

I attempted to use the Flash-driven uploader on Gravity's CPG and a 1k image file under 100 x 100 and was returned the 404 error above (see attachment).


Joachim Müller

@Gravity: please perform a SVN checkout and upgrade your gallery with that.

Gravity

I have requested all the php.ini server-side limits get upgraded (like to 16MB of RAM, and 10MB for post file limits). My server admins will do that for me, as I'm not technical enough.

I am downloading the SVN version from link you provided.
Would you like me to postpone the version upgrade until after the server-side limits are changed, so we try again uploading knowing the server memory settings are not a limit? (isolation testing) Or have you already deduced from the 1k of 100x100 upload that it is not server-side?

phill104

Do the upgrade whatever. Loads of things have been changed or fixed since the initial release and it may be your error is one of them.
It is a mistake to think you can solve any major problems just with potatoes.

Gravity

Will do so at my next opportunity to focus on this.

Joachim Müller

Will take less than 10 minutes, so what are you waiting for?
Anyway, this is a support request, moving accordingly from cpg1.5 Testing/Bugs

Gravity