Author |
Message |
sqzdog
Involved


Joined: Sep 22, 2003
Posts: 252
|
Posted:
Fri Jan 28, 2005 10:25 am |
|
I tried to add an admin to my site. After I entered the info it went to a blank admin.php screen. This new admin doesn't show up in the admin list. Any ideas? |
|
|
|
 |
sixonetonoffun
Spouse Contemplates Divorce

Joined: Jan 02, 2003
Posts: 2496
|
Posted:
Fri Jan 28, 2005 11:21 am |
|
Take a structure dump of the authors table and compare the number of columns to the number of columns in the INSERT statement in /admin/modules/authors.php |
_________________ [b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 |
|
|
 |
sqzdog

|
Posted:
Fri Jan 28, 2005 11:33 am |
|
Man, I'm lost. I have no idea what you mean by that. |
|
|
|
 |
sixonetonoffun

|
Posted:
Fri Jan 28, 2005 11:56 am |
|
Ok what I mean is use phpmyadmin and do an export of the structure of the authors table.
Then count the columns (field names) .
Then in the authors.php find something like this:
Code:
$result = $db->sql_query("insert into " . $prefix . "_authors values ('$add_aid', '$add_name', '$add_url', '$add_email', '$add_pwd', '0', '$add_radminarticle','$add_radmintopic','$add_radminuser','$add_radminsurvey','$add_radminlink','$add_radminfaq','$add_radmindownload','$add_radminreviews','$add_radminnewsletter','$add_radminforum','$add_radmincontent','$add_radminency','$add_radminsuper','$add_admlanguage')");
|
So in this example there are 20 columns in the authors table insert statement. The authors table must have the same number of columns for this to work. |
|
|
|
 |
sqzdog

|
Posted:
Fri Jan 28, 2005 12:05 pm |
|
24 columns on the export. Where do I compare that to? If the numbers aren't equal, what do I do to fix it? |
|
|
|
 |
sixonetonoffun

|
Posted:
Fri Jan 28, 2005 12:30 pm |
|
/admin/modules/authors.php
There is only one insert statement so its pretty easy to find.
If there are less in the insert statement you can add blank values for each by adding
'',
one for each missing column so that there are a matching number of columns.
alterantively if some of those columns in the DB are for old addons you don't use anymore you can make a backup and delete any extra ones. Make sure you take a backup first just in case. |
|
|
|
 |
sqzdog

|
Posted:
Fri Jul 20, 2007 8:44 am |
|
I am again having problems adding an admin on my other nuke site.
I have the following in my tables:
Quote: | aid varchar(25) No
name varchar(50) Yes NULL
url varchar(255) No
email varchar(255) No
pwd varchar(40) Yes NULL
counter int(11) No 0
radminarticle tinyint(2) No 0
radmintopic tinyint(2) No 0
radminuser tinyint(2) No 0
radminsurvey tinyint(2) No 0
radminlink tinyint(2) No 0
radminfaq tinyint(2) No 0
radmindownload tinyint(2) No 0
radminreviews tinyint(2) No 0
radminnewsletter tinyint(2) No 0
radminforum tinyint(2) No 0
radmincontent tinyint(2) No 0
radminency tinyint(2) No 0
radminsuper tinyint(2) No 1
admlanguage varchar(30) No
radminapprove tinyint(2) No 0
radminpreapprove tinyint(2) No 0 |
This is what my authors.php says:
Quote: | $result = $db->sql_query("insert into " . $prefix . "_authors values ('$add_aid', '$add_name', '$add_url', '$add_email', '$add_pwd', '0', '$add_radminarticle','$add_radmintopic','$add_radminuser','$add_radminsurvey','$add_radminlink','$add_radminfaq','$add_radmindownload','$add_radminreviews','$add_radminnewsletter','$add_radminforum','$add_radmincontent','$add_radminency','$add_radminsuper','$add_admlanguage');
if (!$result) {
return; |
|
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jul 20, 2007 5:43 pm |
|
Your table has the last two fields radminapprove and radminpreapprove that are not showing in your SQL insert statement.
You can either drop those two fields, or figure out how to change your code. It might also be good to find out why those two fields exist.  |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
|