PDA

View Full Version : Error: Unknown column 'active' in 'field list'


TWC
22nd February 2006, 09:57
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

falko
22nd February 2006, 10:59
You must add the column "active" to your soa table, as outlined here: http://www.howtoforge.com/mydns_name_server

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;

TWC
22nd February 2006, 13:25
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

falko
22nd February 2006, 19:47
Please check the settings for the admin user under "System", especially if the module "dns" is enabled for admin.

TWC
22nd February 2006, 23:22
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

falko
22nd February 2006, 23:54
System? Can you guide me a little more? DB, table, column, entry, etc or are you referring to a different conf?

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

TWC
23rd February 2006, 00:01
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:

falko
23rd February 2006, 00:19
Please check what's in your sys_user table:
mysql -u root -p
USE mydns;
SELECT * FROM sys_user;
quit;

What's the output of the SELECT statement?

TWC
23rd February 2006, 00:26
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)

falko
23rd February 2006, 00:58
How did you manage to have 3 as userid for admin? Should be 1.
For me it looks like this:

+--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
| 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
UPDATE sys_user SET userid = '1' WHERE username = 'admin';

TWC
23rd February 2006, 02:06
I still get the same error on any system or dns selection.

Tc

falko
23rd February 2006, 08:53
Can you change the admin record so that it looks like mine?

Why did your admin user have the userid 3?

TWC
24th February 2006, 01:19
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:

+--------+------------+-------------+---------------+----------------+----------------+----------+----------------------------------+-----------+-------------+-----------+-------+--------+------+---------+-------------+---------+-----+-----+------+-------+-----+---------+-----+----------+--------+---------------+
| 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

till
24th February 2006, 16:30
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.

Spode
26th April 2006, 23:59
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

Spode
27th April 2006, 12:57
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

falko
27th April 2006, 13:28
Set allow_call_time_pass_reference to true in your php.ini and restart Apache.

Spode
27th April 2006, 13:30
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

falko
27th April 2006, 17:53
These are just notices. Set the error level to its previous state, and it should work.

Spode
27th April 2006, 18:21
Of course they are. LOL. Silly me.

However, I'm still getting the permissions error.

mrsassy
14th May 2006, 10:32
Error:
You don't have the permission to view this record or this record does not exist!

I set up MyDNS with MyDNSconfig on Debian Sarge by following your how-to instructions. When I first log in, I can create and edite DNS records and they work. I can also create new users.
Problems -
1 - I can't create any groups. I type the group name and click the save button but they never save.
2 - After my initial login, I log out. From that point forward, I can log in but I can't edit DNS records or users. When I click on an item, I get this error:
Error:
You don't have the permission to view this record or this record does not exist!

falko
14th May 2006, 17:08
Please make sure you followed this tutorial: http://www.howtoforge.com/mydns_name_server to the letter.

Spode
15th May 2006, 00:18
I followed it twice and it still didnt work. I'm just using the one that comes with MyDNS now. Although even that had a bug I had to fix...

parn
24th June 2006, 04:24
Hi there.

I have the self Problem..
I used the howto from howtoforge to install myDNS and the myDNSconfig-Interface.

I had fixed the 'active'-Bug with ALTER.
But now I have this problem:
Error:
You don't have the permission to view this record or this record does not exist!

Has somebody a solution for this problem?

thanks!

parn

p.s.: sorry for my bad english ;-)

falko
25th June 2006, 14:21
Maybe it is a problem with the charset of your MySQL database... :confused:
Please set the charset to latin1. Here's an example that you can adjust to MyDNSConfig: http://www.howtoforge.com/forums/showpost.php?p=30419&postcount=21