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: Uploading in user mode results in error  (Read 3362 times)

0 Members and 1 Guest are viewing this topic.

andrewshu329

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • sasphotos.net
Uploading in user mode results in error
« on: October 03, 2005, 08:28:36 am »

I created three albums, each in a seperate category.
When in admin mode i can upload to any album, but in user mode the upload page says:

Sorry there is no album where you are allowed to upload files

http://www.sasphotos.net

test user account: testUser
pswd: lol

Thanks in advance!


File: C:\Program Files\Apache Group\Apache2\htdocs\cpg141\upload.php - Line: 858

Code: [Select]
USER:
------------------
Array
(
    [ID] => a2e62a5da80bfd26349c45fd65b861f9
    [am] => 0
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => admin
    [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] => 1
    [priv_upl_need_approval] => 1
    [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 cpg145_filetypes; (0.001s)
    [1] => select * from cpg145_plugins order by priority asc; (0.001s)
    [2] => delete from `photo1`.cpg145_sessions where time<1128317074 and remember=0; (0.001s)
    [3] => delete from `photo1`.cpg145_sessions where time<1127111074; (0.001s)
    [4] => select user_id from `photo1`.cpg145_sessions where session_id=md5("d8f12c5cec32f41bcbc0d6bed5acf2de345748d724eb2ed77d991d64273fb16b"); (0.001s)
    [5] => select user_id as id, user_password as password from `photo1`.cpg145_users where user_id=1 (0.001s)
    [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 `photo1`.cpg145_users AS u INNER JOIN `photo1`.cpg145_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
    [7] => SELECT user_group_list FROM `photo1`.cpg145_users AS u WHERE user_id='1' and user_group_list <> ''; (0.003s)
    [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 cpg145_usergroups WHERE group_id in (1) (0.001s)
    [9] => SELECT group_name FROM  cpg145_usergroups WHERE group_id= 1 (0.001s)
    [10] => update `photo1`.cpg145_sessions set time='1128320674' where session_id=md5('d8f12c5cec32f41bcbc0d6bed5acf2de345748d724eb2ed77d991d64273fb16b'); (0.001s)
    [11] => SELECT user_favpics FROM cpg145_favpics WHERE user_id = 1 (0.001s)
    [12] => DELETE FROM cpg145_banned WHERE expiry < '2005-10-03 14:24:34' (0.001s)
    [13] => SELECT * FROM cpg145_banned WHERE (ip_addr='61.173.22.194' OR ip_addr='61.173.22.194' OR user_id=1) AND brute_force=0 (0.001s)
    [14] => SELECT aid, title FROM cpg145_albums WHERE category < 10000 AND uploads='YES' ORDER BY title (0.001s)
    [15] => SELECT aid, title FROM cpg145_albums WHERE category='10001' ORDER BY title (0.001s)
    [16] => SELECT COUNT(*) FROM cpg145_pictures WHERE approved = 'NO' (0.001s)
)

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

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

==========================
Page generated in 0.221 seconds - 17 queries in 0.019 seconds - Album set : ; Meta set: ;
« Last Edit: October 03, 2005, 08:48:21 am by GauGau »
Logged
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Uploading in user mode results in error
« Reply #1 on: October 03, 2005, 08:34:11 am »

This is not a bug. Have you created any album after you logged in as user? You need atleast one album created by the logged in user.

[edit]
I confirmed that there are no albums for user "testUser". Marking this thread as invalid

I misread the "user mode" and thought that you are talking about the user logging in and then uploading
[/edit]
« Last Edit: October 03, 2005, 08:40:08 am by Abbas Ali »
Logged
Chief Geek at Ranium Systems

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Uploading in user mode results in error
« Reply #2 on: October 03, 2005, 08:42:40 am »

Do you have any album in Admin's personal gallery? If not then you need to create one.
Logged
Chief Geek at Ranium Systems

andrewshu329

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • sasphotos.net
Re: Uploading in user mode results in error
« Reply #3 on: October 03, 2005, 08:46:59 am »

Sorry for this, i just found out that my albums did not have "visitors can upload" set to yes on any of them
I changed this for all albums and it works now
Thanks alot!
Logged
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Uploading in user mode results in error
« Reply #4 on: October 03, 2005, 08:48:08 am »

well, uploading in user mode is a silly idea in the first place. Stay in admin mode all the time unless you want to see what your gallery looks like for regular users (i.e. not displaying the admin controls, that's all). Go back to admin mode to actually upload, preferably using batch-add. Abbas is right: when the admin is in user mode, the permissions for users apply, so the admin needs to have a personal gallery or a public album everybody is allowed to upload to. This is expected behaviour.

Cpg1.4.x goes unsupported. This thread is "Invalid".
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.