Unable to add new users after upgrade Unable to add new users after upgrade
 

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

Unable to add new users after upgrade

Started by wildwalker, June 12, 2006, 11:47:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wildwalker

Hi all,

Version 1.4.8
www.cameraangle.co.uk

Ive been reading lots of posts on here but as yet have not found the answer to this one. I have been using Coppermine 1.3.x (1 i think) and upgraded to 1.4.8 using the upgrade instructions, all was fine and I have uploaded pics etc no problem. However, I went to add a new user and get the error "There was an error while processing a database query". I enabled debug mode and got this:

"While executing query "INSERT INTO cpg11d_users(user_regdate, user_active) VALUES (NOW(), 'YES')" on 0
mySQL error: Field 'user_password' doesn't have a default value"

and...

"USER:
------------------
Array
(
    [ID] => 7a995309760dd3fc15261e23d3aab075
    [am] => 1
    [liv] => Array
        (
            [0] => 3309
            [1] => 3343
            [2] => 3283
            [3] => 2798
            [4] => 3298
        )

)

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

    [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 cpg11d_filetypes; (0.002s)
    [1] => select * from cpg11d_plugins order by priority asc; (0.001s)
    [2] => delete from `Alan_Gallery`.cpg11d_sessions where time<1150101841 and remember=0; (0.001s)
    [3] => delete from `Alan_Gallery`.cpg11d_sessions where time<1148895841; (0.001s)
    [4] => select user_id from `Alan_Gallery`.cpg11d_sessions where session_id=md5("ec5510fb3f139e9dc122554d28e3f576d7611344b5183c0eb43844ac3224e3e6"); (0.001s)
    [5] => select user_id as id, user_password as password from `Alan_Gallery`.cpg11d_users where user_id=3 (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 `Alan_Gallery`.cpg11d_users AS u INNER JOIN `Alan_Gallery`.cpg11d_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='3' (0.001s)
    [7] => SELECT user_group_list FROM `Alan_Gallery`.cpg11d_users AS u WHERE user_id='3' and user_group_list <> ''; (0.001s)
    [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 cpg11d_usergroups WHERE group_id in (1,2) (0.001s)
    [9] => SELECT group_name FROM  cpg11d_usergroups WHERE group_id= 1 (0.001s)
    [10] => update `Alan_Gallery`.cpg11d_sessions set time='1150105441' where session_id=md5('ec5510fb3f139e9dc122554d28e3f576d7611344b5183c0eb43844ac3224e3e6'); (0.001s)
    [11] => SELECT user_favpics FROM cpg11d_favpics WHERE user_id = 3 (0.001s)
    [12] => DELETE FROM cpg11d_banned WHERE expiry < '2006-06-12 09:44:01' (0.001s)
    [13] => SELECT * FROM cpg11d_banned WHERE (ip_addr='86.131.73.234' OR ip_addr='86.131.73.234' OR user_id=3) AND brute_force=0 (0.001s)
    [14] => INSERT INTO cpg11d_users(user_regdate, user_active) VALUES (NOW(), 'YES') (0.002s)
    [15] => SELECT COUNT(*) FROM cpg11d_pictures WHERE approved = 'NO' (0.001s)
)

==========================
GET :
------------------
Array
(
    [op] => new_user
)

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

==========================
VERSION INFO :
------------------
PHP version: 5.1.4 - OK
------------------
mySQL version: 5.0.22-community-nt
------------------
Coppermine version: 1.4.8(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 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:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.7
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
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 | .;C:\php5\pear | .;C:\php5\pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | no value | no value
SMTP | localhost | localhost
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 | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.201 seconds - 16 queries in 0.018 seconds - Album set : ; Meta set: ;"


Any help gratefully received.

Best regards,
Alan Walker.

edit (by Paver): Put debug_info into a code block, for readability of this thread.

Paver

Please don't post the complete debug_info unless requested by a supporter.  And when you do, please use the "code" button (with the # sign).

I believe this is a MySQL 5 error, assuming your server is running MySQL 5.  Other threads discuss issues with MySQL 5, but I believe the simplest thing to do is to add a default value to that table's field using a tool like phpMyAdmin. 

wildwalker

Sorry about the long post Paver.

When you say 'that table's' field, what table are you referring to (is it cpg11d_users?)

And what default value would you add?

Thanks.

Nibbler

ALTER TABLE cpg11d_users CHANGE user_password user_password VARCHAR( 40 ) NOT NULL default ''

wildwalker

Ok thanks Paver and Nibbler.

I had to give every field a default value, although the field user_profile6 wouldn't accept a default value (and coppermine then gave the same error for that field) so I unticked the 'Not null' option and all was fine, I could create another user.

Thanks for the help guys, much appreciated.  ;D

Alan.