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: db_input.php line 636  (Read 41353 times)

0 Members and 1 Guest are viewing this topic.

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
db_input.php line 636
« on: November 19, 2011, 04:43:00 pm »

hello
I was looking for a problem like me but I failed.
after uploading upgrade from 1.4 to 1.5 did almost everything except the pop-up communication painless when you add a pic. Please help because I do not give the council - is beyond me.

/galeria/db_input.php - Linia: 636

Code: [Select]
USER:
------------------
Array
(
    [ID] => 5a89b1fb1ef122fbc5a4566adbf2b134
    [am] => 1
    [lang] => polish
    [liv] => Array
        (
            [0] => 883
            [1] => 880
            [2] => 885
            [3] => 868
            [4] => 866
        )

    [upload_method] => html_single
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => psbasg
    [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
    [can_create_public_albums] => 0
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg1410_config [include/init.inc.php:181] (0 ms)
    [1] => SELECT * FROM cpg1410_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT user_id, time FROM `db2_psbasg_net`.cpg1410_sessions WHERE session_id = '6ccf9934fed5a105f12340541760ec1d' [bridge/coppermine.inc.php:264] (0 ms)
    [3] => SELECT user_id, user_password FROM `db2_psbasg_net`.cpg1410_users WHERE user_id = 1 [bridge/coppermine.inc.php:276] (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 `db2_psbasg_net`.cpg1410_users AS u LEFT JOIN `db2_psbasg_net`.cpg1410_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' [bridge/udb_base.inc.php:70] (0 ms)
    [5] => SELECT user_group_list FROM `db2_psbasg_net`.cpg1410_users AS u WHERE user_id='1' AND user_group_list <> '' [bridge/coppermine.inc.php:202] (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 cpg1410_usergroups WHERE group_id in (1) [bridge/udb_base.inc.php:323] (0 ms)
    [7] => SELECT group_name FROM cpg1410_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:327] (0 ms)
    [8] => SELECT COUNT(*) FROM cpg1410_categorymap WHERE group_id in (1) [bridge/udb_base.inc.php:340] (0 ms)
    [9] => SELECT lang_id FROM cpg1410_languages WHERE enabled='YES' [include/init.inc.php:329] (0 ms)
    [10] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 1 [include/init.inc.php:387] (0 ms)
    [11] => DELETE FROM cpg1410_banned WHERE expiry < '2011-11-19 16:38:14' [include/init.inc.php:443] (35 ms)
    [12] => SELECT null FROM cpg1410_banned WHERE (user_id=1 OR '88.199.120.61' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:459] (0 ms)
    [13] => SELECT category FROM cpg1410_albums WHERE aid = 136 [db_input.php:549] (0 ms)
    [14] => SELECT extension, mime, content, player FROM cpg1410_filetypes [include/functions.inc.php:5809] (0 ms)
    [15] => SELECT COUNT(*) FROM cpg1410_pictures WHERE approved = 'NO' [include/functions.inc.php:2438] (0 ms)
    [16] => SELECT lang_id, abbr FROM cpg1410_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2316] (0 ms)
    [17] => DELETE FROM cpg1410_temp_messages WHERE time < 1321713494 [include/functions.inc.php:4947] (0 ms)
)

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

==========================
POST :
------------------
Array
(
    [method] => html_single
    [album] => 136
    [MAX_FILE_SIZE] => 1089536
    [title] =>
    [caption] =>
    [keywords] =>
    [event] => picture
    [form_token] => 0719d8320c46ae7db4cbcb78ce69513f
    [timestamp] => 1321717080
)

==========================
COOKIE :
------------------
Array
(
    [cpg143_data] => YTo1OntzOjI6IklEIjtzOjMyOiI1YTg5YjFmYjFlZjEyMmZiYzVhNDU2NmFkYmYyYjEzNCI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czo2OiJwb2xpc2giO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6Ijg4MyI7aToxO3M6MzoiODgwIjtpOjI7czozOiI4ODUiO2k6MztzOjM6Ijg2OCI7aTo0O3M6MzoiODY2Ijt9czoxMzoidXBsb2FkX21ldGhvZCI7czoxMToiaHRtbF9zaW5nbGUiO30=
    [85850639eed34f0d6f1965f32ac49588] => 7e8d0821bb74fd5cc190c7cf2e684fb2
)

==========================
VERSION INFO :
------------------
PHP version        5.2.12-pl0-gentoo OK   
MySQL version      5.1.32-log        OK   
Coppermine version 1.5.16            stable

==========================
Module: GD
------------------
Exact version                    2.0.34                     
GD Version                       bundled (2.0.34 compatible)
FreeType Support                 1                         
FreeType Linkage                 with freetype             
T1Lib Support                    1                         
GIF Read Support                 1                         
GIF Create Support               1                         
JPG Support                      1                         
PNG Support                      1                         
WBMP Support                     1                         
XPM Support                                                 
XBM Support                      1                         
JIS-mapped Japanese Font Support                           

==========================
Key config settings
------------------
site_url             http://www.psbasg.net/galeria/             
charset              utf-8                                       
allow_private_albums 0                                           
cookie_name          cpg143                                     
cookie_path          /                                           
impath                                                           
lang                 polish                                     
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                1                                                                                                                                                                                                                                                                                                                                                     
safe_mode_exec_dir                                                                                                                                                                                                                                                                                                                                                             
safe_mode_gid                                                                                                                                                                                                                                                                                                                                                                   
safe_mode_include_dir    .:/usr/lib64/php5/:/usr/share/pear:/usr/share/php                                                                                                                                                                                                                                                                                                     
sql.safe_mode                                                                                                                                                                                                                                                                                                                                                                   
disable_functions        dl,system,exec,passthru,shell_exec,mail,show_source,disk_free_space,disk_total_space,fileowner,filegroup,link,linkinfo,lstat,readlink,symlink,proc_terminate,proc_open,proc_nice,proc_get_status,proc_close,set_time_limit,leak,chgrp,show_source,highlight_file,popen,pclose,error_log,openlog,syslog,apache_child_terminate,apache_note,apache_setenv
file_uploads             1                                                                                                                                                                                                                                                                                                                                                     
include_path             .:/usr/lib64/php5:/usr/share/pear:/usr/share/php:/usr/share/php5:/usr/share/php/smarty                                                                                                                                                                                                                                                                 
open_basedir             /tmp:/var/tmp:/var/lib/php:/var/lib/php-pkg/dev-lang/php-5.2.5/:/usr/lib64/php5:/usr/share/pear:/usr/share/php:/usr/share/php5:/usr/share/php5/Zend/:/virtual/net/psbasg                                                                                                                                                                               
allow_url_fopen                                                                                                                                                                                                                                                                                                                                                                 
max_execution_time       30                                                                                                                                                                                                                                                                                                                                                     
max_input_time           60                                                                                                                                                                                                                                                                                                                                                     
upload_max_filesize      20M                                                                                                                                                                                                                                                                                                                                                   
post_max_size            48M                                                                                                                                                                                                                                                                                                                                                   
memory_limit             64M                                                                                                                                                                                                                                                                                                                                                   
suhosin.post.max_vars    300                                                                                                                                                                                                                                                                                                                                                   
suhosin.request.max_vars 300                                                                                                                                                                                                                                                                                                                                                   


==========================
Page (performance)
------------------
Parameter        Current  Peak   
Memory usage     5.91 MiB 7.06 MiB
Page generation  177 ms   177 ms 
Page query time  35 ms    35 ms   
Page query count 18       18     


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

I sought a bit and locate the line mentioned but I do not see what could be wrong here
Code: [Select]
// Move the picture into its final location
    // getRaw is safe here since this filename is generated by the server
    if (!move_uploaded_file($superCage->files->getRaw("/userpicture/tmp_name"), $uploaded_pic)) {
        [b]cpg_die(CRITICAL_ERROR, sprintf($lang_db_input_php['err_move'], $picture_name, $dest_dir), __FILE__, __LINE__, true);[/b]
    }
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #2 on: November 23, 2011, 09:18:07 pm »

ok  ;)

Code: [Select]
USER:
------------------
Array
(
    [ID] => 542c8eaab2315591eb62cc98da095248
    [lang] => polish
    [liv] => Array
        (
            [0] => 1566
            [1] => 1565
            [2] => 1571
            [3] => 1570
            [4] => 1558
        )

    [lap] => 1
    [liv_a] => Array
        (
            [0] => 135
            [1] => 120
            [2] => 117
            [3] => 129
            [4] => 134
        )

    [am] => 1
)

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

    [disk_max] => 1024
    [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] => 0
    [access_level] => 3
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Registered
    [can_create_public_albums] => 0
    [group_quota] => 0
    [can_see_all_albums] => 0
    [group_id] => 2
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg1410_config [include/init.inc.php:181] (4 ms)
    [1] => SELECT * FROM cpg1410_plugins ORDER BY priority [include/plugin_api.inc.php:54] (6 ms)
    [2] => SELECT user_id, time FROM `db2_psbasg_net`.cpg1410_sessions WHERE session_id = '3354c368a3ecd5b877159f86d48b077f' [bridge/coppermine.inc.php:264] (9 ms)
    [3] => SELECT user_id, user_password FROM `db2_psbasg_net`.cpg1410_users WHERE user_id = 6 [bridge/coppermine.inc.php:276] (5 ms)
    [4] => SELECT u.user_id AS id, u.user_name AS username, user_password AS password, u.user_group AS group_id FROM `db2_psbasg_net`.cpg1410_users AS u LEFT JOIN `db2_psbasg_net`.cpg1410_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='6' [bridge/udb_base.inc.php:70] (7 ms)
    [5] => SELECT user_group_list FROM `db2_psbasg_net`.cpg1410_users AS u WHERE user_id='6' AND user_group_list <> '' [bridge/coppermine.inc.php:202] (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 cpg1410_usergroups WHERE group_id in (2,5) [bridge/udb_base.inc.php:323] (0 ms)
    [7] => SELECT group_name FROM cpg1410_usergroups WHERE group_id= 2 [bridge/udb_base.inc.php:327] (0 ms)
    [8] => SELECT COUNT(*) FROM cpg1410_categorymap WHERE group_id in (2,5) [bridge/udb_base.inc.php:340] (0 ms)
    [9] => SELECT aid FROM cpg1410_albums WHERE moderator_group IN (2,5) [include/init.inc.php:271] (0 ms)
    [10] => SELECT lang_id FROM cpg1410_languages WHERE enabled='YES' [include/init.inc.php:329] (7 ms)
    [11] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 6 [include/init.inc.php:387] (2 ms)
    [12] => DELETE FROM cpg1410_banned WHERE expiry < '2011-11-23 21:09:18' [include/init.inc.php:443] (24 ms)
    [13] => SELECT null FROM cpg1410_banned WHERE (user_id=6 OR '88.199.120.202' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:459] (10 ms)
    [14] => SELECT DISTINCT category FROM cpg1410_albums WHERE owner = '6' AND aid='0' [include/functions.inc.php:5247] (21 ms)
    [15] => SELECT DISTINCT aid FROM cpg1410_albums AS alb INNER JOIN cpg1410_categorymap AS catm ON alb.category=catm.cid WHERE alb.owner = '6' AND alb.aid='0' AND catm.group_id='2' [include/functions.inc.php:5278] (10 ms)
    [16] => SELECT category FROM cpg1410_albums WHERE aid = 136 AND (uploads = 'YES' OR owner = 6 OR category = 10006) [db_input.php:536] (0 ms)
    [17] => SELECT extension, mime, content, player FROM cpg1410_filetypes [include/functions.inc.php:5809] (0 ms)
    [18] => SELECT null FROM cpg1410_albums WHERE category='10006' AND aid = '136' [themes/curve_lucid_green/theme.php:438] (6 ms)
    [19] => SELECT null FROM cpg1410_albums WHERE category < 10000 AND uploads='YES' AND (visibility = '0' OR visibility IN (2,5)) AND aid = '136' [themes/curve_lucid_green/theme.php:448] (0 ms)
    [20] => SELECT null FROM cpg1410_albums WHERE category='10006' AND aid = '136' [themes/curve_lucid_green/theme.php:438] (2 ms)
    [21] => SELECT null FROM cpg1410_albums WHERE category < 10000 AND uploads='YES' AND (visibility = '0' OR visibility IN (2,5)) AND aid = '136' [themes/curve_lucid_green/theme.php:448] (0 ms)
)

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

==========================
POST :
------------------
Array
(
    [method] => html_single
    [album] => 136
    [MAX_FILE_SIZE] => 1089536
    [title] =>
    [caption] =>
    [keywords] =>
    [event] => picture
    [form_token] => 4d0c9ada0a44ed4e0a03a540153466d9
    [timestamp] => 1322078945
)

==========================
COOKIE :
------------------
Array
(
    [8c4979991fc2fb3452d16572a44ebeb8] => c7c1022a9fdd8027fa3125cc662c14cf
    [b29302dca2df4be5fb842bf24bf0c6fd] => eb322aef7f5c1928e5042f7536e43268
    [fe2fdf4a2ed5d6147b9ee74545366763] => 9fd82cfa8d9620f51513f190aab95c8d
    [cpg143_data] => YTo2OntzOjI6IklEIjtzOjMyOiI1NDJjOGVhYWIyMzE1NTkxZWI2MmNjOThkYTA5NTI0OCI7czo0OiJsYW5nIjtzOjY6InBvbGlzaCI7czozOiJsaXYiO2E6NTp7aTowO3M6NDoiMTU2NiI7aToxO3M6NDoiMTU2NSI7aToyO3M6NDoiMTU3MSI7aTozO3M6NDoiMTU3MCI7aTo0O3M6NDoiMTU1OCI7fXM6MzoibGFwIjtpOjE7czo1OiJsaXZfYSI7YTo1OntpOjA7aToxMzU7aToxO2k6MTIwO2k6MjtpOjExNztpOjM7aToxMjk7aTo0O2k6MTM0O31zOjI6ImFtIjtpOjE7fQ==
)

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

Here's the test user account data:
    Username: tester
    Password: tester

up album: test album

galery: http://www.psbasg.net/galeria/index.php
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: db_input.php line 636
« Reply #3 on: November 24, 2011, 12:08:52 pm »

Quote
Critical error
Impossible to move sun-rise.jpg to albums/userpics/10006/!

File: /virtual/net/psbasg/galeria/db_input.php - Line: 636

Please review the permissions of the upload directory and all sub-directories.
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #4 on: November 24, 2011, 12:42:19 pm »

This is checked at the beginning. Album settings are the same as in version 1.4 - there are pictures they added.
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #5 on: November 24, 2011, 12:47:50 pm »

Sorry - no edit

All upload directory and all sub-directories have 777
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: db_input.php line 636
« Reply #6 on: November 24, 2011, 01:19:11 pm »

Then we need to debug the upload process. Open db_input.php, find
Code: [Select]
    if (!move_uploaded_file($superCage->files->getRaw("/userpicture/tmp_name"), $uploaded_pic)) {
        cpg_die(CRITICAL_ERROR, sprintf($lang_db_input_php['err_move'], $picture_name, $dest_dir), __FILE__, __LINE__, true);
    }
and above, add
Code: [Select]
print_r($superCage->files->_source);
die();
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #7 on: November 24, 2011, 02:15:27 pm »

Added
I get this message
Code: [Select]
Array ( [userpicture] => Array ( [name] => napelnij_prosze.jpg [type] => image/jpeg [tmp_name] => /tmp/phpC1EnjX [error] => 0 [size] => 65527 ) ) I am counting on your help :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: db_input.php line 636
« Reply #8 on: November 24, 2011, 02:42:26 pm »

So the file has been successfully uploaded to the server's temp directory. For some reason it cannot be moved to its designated destination. I suggest to test if HTTP uploads work at all (I'm sure you'll find some upload scripts with the help of Google) or ask your hosting provider for support, as you said you've set all permissions correctly.
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #9 on: November 24, 2011, 02:52:54 pm »

So I have another question - if I put a new cpg1.5 script is completely clean the old albums I can lose without losing data?
The provider to appeal and will inform the response.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: db_input.php line 636
« Reply #10 on: November 24, 2011, 03:24:47 pm »

I don't think that a fresh install will fix that issue, but feel free to test. If it works with that new installation, you can find some information in our docs how to import your data: http://documentation.coppermine-gallery.net/en/export.htm

Basically you have to set the database connection in include/config.inc.php and move/copy your albums directory (and all used plugins and themes) to the new installation.
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #11 on: November 28, 2011, 11:51:18 am »

Hmm
Mysterious thing happened.
Uploading single files but does not transfer multiple files at the same time works very elegantly.
My intervention is only adding the entry and request for help hosting - from them is still no response.
So thanks for trying to help.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: db_input.php line 636
« Reply #12 on: November 28, 2011, 11:55:15 am »

I'm not sure what you're trying to tell me. Is your issue solved? If so,
Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well. Finally, you can tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged

psbasg

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: db_input.php line 636
« Reply #13 on: November 28, 2011, 09:11:26 pm »

problem was partially solved - so I have a dilemma - the following pictures in groups and not individually.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.