coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: larslindqvist on July 28, 2005, 10:25:00 AM

Title: Cant add more users!
Post by: larslindqvist on July 28, 2005, 10:25:00 AM
when someone is trying to regiester on my site it says:
"There was an error while processing a database query."

code:

While executing query "INSERT INTO cpg130_users (user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_location, user_interests, user_website, user_occupation) VALUES (NOW(), 'NO', '11f7cd1ca2cf6c38bd2ef776d00f567d', 'Milka', 'july', 'adas@yahoo.com', '', '', '', 'Student' )" on 0

mySQL error: Unknown column 'user_location' in 'field list'

And this is when I (admin) is trying to add a user:

There was an error while processing a database query

code:

While executing query "UPDATE cpg130_users SET user_name           = 'bla', user_email          = 'lars@linsson.com', user_active    = 'YES', user_group           = '2', user_location  = 'bla', user_interests = 'bla ', user_website          = 'bla', user_occupation= 'bla', user_group_list      = '', user_password = 'bla' WHERE user_id = '37'" on 0

mySQL error: Unknown column 'user_location' in 'field list'

and under that it says:

File: /home/virtual/linsson.com/public_html/2.lars/include/functions.inc.php - Line: 110

debug:

USER:
------------------
Array
(
    [ID] => 6d7014850b349f4bc5d00caf75f33183
    [am] => 1
    [liv] => Array
        (
           
Title: Re: Cant add more users!
Post by: Joachim Müller on July 29, 2005, 08:11:28 AM
Use a tool like phpMyAdmin, browse coppermine's user table and check that a column "user_location" actually exists. If it doesn't, then you probably have deleted it accidentally. It has to be user_location varchar(255) NOT NULL default '', - re-insert the column.
Title: Re: Cant add more users!
Post by: larslindqvist on July 30, 2005, 11:35:51 AM
thanks for the fast reply! I thought I would let dreamvieaver search trhu my whole website for " user_location varchar(255) NOT NULL default ''," and as u said It cant find it. then I tried to find that user table and the right user_location but I couldnt figure out where I should put it.... please help...
I will keep searching the forums and web,,,

cheers

lars
Title: Re: Cant add more users!
Post by: Joachim Müller on July 30, 2005, 12:00:25 PM
you don't do this in a file: it happens directly on your database. That's why I suggested using phpMyAdmin (http://www.phpmyadmin.net/) or similar. Ask your webhost for it (he may have a similar tool like cpanel available), or install it.
Sidenote: don't use Dreamweaver to edit your coppermine files unless you know your way around extremely well. Your OS is capable of searching for particular srtings in files as well. I also have the impression that you're using an outdated version of coppermine, so please post a link to your site as well.
Title: Re: Cant add more users!
Post by: larslindqvist on July 31, 2005, 12:10:59 PM
www.linsson.com/2.lars
So you mean it might be solved if I update my database?
thanks alot for the help gaugau!
Title: Re: Cant add more users!
Post by: Joachim Müller on July 31, 2005, 10:09:39 PM
no, that's not what I was suggesting. You don't update anything, you fix things that are broken (either by accident by you, or by something your webhost did, or because your site got hacked, or because of a technical malfunction like a harddisk error). As you don't appear to be very experienced I recommend asking your webhost for support.
Title: Re: Cant add more users!
Post by: larslindqvist on August 05, 2005, 12:52:33 PM
My webhost told me they cant help me with that so it looks like i have to try my self or ask some of my more experienced friends... Is it possible to get some tips how to work it out?

thanks

lars
Title: Re: Cant add more users!
Post by: Joachim Müller on August 05, 2005, 06:18:07 PM
take a look at the content of the sql folder that comes with coppermine. The file schema.sql contains the query that creates the tables. If a table that is required doesn't exist, build it using the query taken from that file. Remember to change your db prefix in the query. You run queries using phpMyAdmin. You better ask yourself first: why did the tables vanish in the first place? If your site got hacked, you'll have to close all existing vulnerabilities first. A good place to start is trivial passwords - change them asap.