Error: Unknown column 'active' in 'field list'

Discussion in 'General' started by TWC, Feb 22, 2006.

  1. TWC

    TWC New Member

    I get a Unknown column 'active' in 'field list' error when creating a dns record.

    I have rechecked all setting and I am stumped.

    Any help will be appreciated.

    Tc
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must add the column "active" to your soa table, as outlined here: http://www.howtoforge.com/mydns_name_server

    Code:
    mysql -u root -p
    Enter password:
    ALTER TABLE mydns.soa ADD COLUMN active ENUM('Y','N') NOT NULL;
    ALTER TABLE mydns.soa ADD INDEX (active);
    ALTER TABLE mydns.soa ADD COLUMN xfer CHAR(255) NOT NULL;
    quit;
     
  3. TWC

    TWC New Member

    That was it, BUT

    That fixed the active error. But now I get

    Error:
    You don't have the permission to view this record or this record does not exist!

    I have setup several records, started testing and now I can't modify any record or user.

    Any HELP will be appreciated.

    TWC
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Please check the settings for the admin user under "System", especially if the module "dns" is enabled for admin.
     
  5. TWC

    TWC New Member

    more info

    System? Can you guide me a little more? DB, table, column, entry, etc or are you referring to a different conf?

    Im running
    FreeBSD 6
    MySQL 5

    Also this seems to occur after adding another user. The first time I deleted all DBs and reinstalled. I don't want to do that again?

    Great work!!!

    THANX
     
    Last edited: Feb 22, 2006
  6. falko

    falko Super Moderator Howtoforge Staff

    I'm referring to the MyDNSConfig web interface. There's a tab "System" where you can manage users.
     
  7. TWC

    TWC New Member

    In system I select admin and get error:

    Error:
    You don't have the permission to view this record or this record does not exist!

    :confused:
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Please check what's in your sys_user table:
    Code:
    mysql -u root -p
    USE mydns;
    SELECT * FROM sys_user;
    quit;
    What's the output of the SELECT statement?
     
  9. TWC

    TWC New Member

    Code:
    mysql> SELECT * FROM sys_user;
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    | userid | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | username | passwort                         | modules   | startmodule | app_theme | typ   | active | name | vorname | unternehmen | strasse | ort | plz | land | email | url | telefon | fax | language | groups | default_group |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    |      4 |          3 |           0 | riud          | riud           |                | test     | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | admin,dns | admin       | default   | admin |      1 |      |         |             |         |     |     |      |       |     |         |     | en       |        |             0 |
    |      3 |          1 |           0 | riud          | riud           |                | admin    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | admin,dns | dns         | default   | admin |      1 |      |         |             |         |     |     |      |       |     |         |     | en       |        |             0 |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    2 rows in set (0.01 sec)
     
    Last edited by a moderator: Feb 22, 2006
  10. falko

    falko Super Moderator Howtoforge Staff

    How did you manage to have 3 as userid for admin? Should be 1.
    For me it looks like this:

    Code:
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    | userid | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | username | passwort                         | modules   | startmodule | app_theme | typ   | active | name | vorname       | unternehmen | strasse | ort | plz | land | email | url | telefon | fax | language | groups | default_group |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    |      1 |          1 |           0 | riud          | riud           |                | admin    | 098f6bcd4621d373cade4e832627b4f6 | dns,admin | dns         | default   | admin |      1 |      | Administrator |             |         |     |     |      |       |     |         |     | en       |        |             0 |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    1 row in set (0.00 sec)
    You can correct this by running
    Code:
    UPDATE sys_user SET userid = '1' WHERE username = 'admin';
     
  11. TWC

    TWC New Member

    I still get the same error on any system or dns selection.

    Tc
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Can you change the admin record so that it looks like mine?

    Why did your admin user have the userid 3?
     
  13. TWC

    TWC New Member

    I have modified the sys_user and confirmed the sys_userid | sys_groupid | sys_perm_user | sys_perm_group | records in soa and rr match. I have reproduced this on two different systems. The same error on system or dns selection.

    Error:
    You don't have the permission to view this record or this record does not exist!

    My current sys_user:

    Code:
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    | userid | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | username | passwort                         | modules   | startmodule | app_theme | typ   | active | name | vorname | unternehmen | strasse | ort | plz | land | email | url | telefon | fax | language | groups | default_group |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    |      1 |          1 |           0 | riud          | riud           |                | admin    | 883a8869eeaf7ba467da2a945d7771e2 | admin,dns | dns         | default   | admin |      1 |      |         |             |         |     |     |      |       |     |         |     | en       |        |             0 |
    +--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
    
    Any suggestions or do you need anything on our end; willing to help.

    Tc
     
    Last edited by a moderator: Feb 24, 2006
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    For me the myDNSConfig database dump works fine. Can you please send me your complete mysql database as asql-dump attached to a pm, then i will try to find the error.
     
  15. Spode

    Spode New Member

    Hi,

    I'm having exactly the same problem as above. Doing the ALTER statement fixed the first issue, but now I'm stuck not being able to edit a record as I'm told I don't have permissions and my user table looks identical to yours.

    Did you ever solve this?

    Spode
     
  16. Spode

    Spode New Member

    Upon turning on displaying of PHP errors, the following appear that don't actually cause execution to stop.

    Notice: Undefined property: app::$listform_actions in /var/www/html/mydns/lib/app.inc.php on line 61

    Notice: Undefined property: app::$tpl in /var/www/html/mydns/lib/classes/listform_actions.inc.php on line 48

    Notice: Undefined property: app::$tpl in /var/www/html/mydns/lib/app.inc.php on line 61

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/mydns/lib/classes/tpl.inc.php on line 451

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/mydns/lib/classes/tpl.inc.php on line 461

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/mydns/lib/classes/tpl.inc.php on line 471

    Notice: Undefined index: template in /var/www/html/mydns/lib/classes/tpl_ini.inc.php on line 89

    Notice: Undefined index: template in /var/www/html/mydns/lib/classes/tpl_ini.inc.php on line 89

    Notice: Undefined property: app::$listform in /var/www/html/mydns/lib/classes/listform_actions.inc.php on line 49

    Notice: Undefined property: app::$listform in /var/www/html/mydns/lib/app.inc.php on line 61

    Notice: Undefined index: search_origin in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_ns in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_ttl in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 80

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 80

    Notice: Undefined index: search_origin in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_ns in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_ttl in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: page_params in /var/www/html/mydns/lib/classes/listform.inc.php on line 138

    Notice: Undefined variable: seiten in /var/www/html/mydns/lib/classes/listform.inc.php on line 142

    Notice: Undefined index: show_page_back in /var/www/html/mydns/lib/classes/listform.inc.php on line 155

    Notice: Undefined index: show_page_next in /var/www/html/mydns/lib/classes/listform.inc.php on line 157
     
    Last edited: Apr 27, 2006
  17. falko

    falko Super Moderator Howtoforge Staff

    Set allow_call_time_pass_reference to true in your php.ini and restart Apache.
     
  18. Spode

    Spode New Member

    Yeah, I thought of that. But I still get this:

    I'm trying to debug it myself, but I'm not getting anywhere quickly.

    Notice: Undefined property: app::$listform_actions in /var/www/html/mydns/lib/app.inc.php on line 61

    Notice: Undefined property: app::$tpl in /var/www/html/mydns/lib/classes/listform_actions.inc.php on line 48

    Notice: Undefined property: app::$tpl in /var/www/html/mydns/lib/app.inc.php on line 61

    Notice: Undefined index: template in /var/www/html/mydns/lib/classes/tpl_ini.inc.php on line 89

    Notice: Undefined index: template in /var/www/html/mydns/lib/classes/tpl_ini.inc.php on line 89

    Notice: Undefined property: app::$listform in /var/www/html/mydns/lib/classes/listform_actions.inc.php on line 49

    Notice: Undefined property: app::$listform in /var/www/html/mydns/lib/app.inc.php on line 61

    Notice: Undefined index: search_origin in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_ns in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_ttl in /var/www/html/mydns/lib/classes/listform.inc.php on line 86

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 80

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 80

    Notice: Undefined index: search_origin in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_ns in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_ttl in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: search_active in /var/www/html/mydns/lib/classes/listform.inc.php on line 95

    Notice: Undefined index: page_params in /var/www/html/mydns/lib/classes/listform.inc.php on line 138

    Notice: Undefined variable: seiten in /var/www/html/mydns/lib/classes/listform.inc.php on line 142

    Notice: Undefined index: show_page_back in /var/www/html/mydns/lib/classes/listform.inc.php on line 155

    Notice: Undefined index: show_page_next in /var/www/html/mydns/lib/classes/listform.inc.php on line 157
     
  19. falko

    falko Super Moderator Howtoforge Staff

    These are just notices. Set the error level to its previous state, and it should work.
     
  20. Spode

    Spode New Member

    Of course they are. LOL. Silly me.

    However, I'm still getting the permissions error.
     

Share This Page