Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
sqzdog
Involved
Involved



Joined: Sep 22, 2003
Posts: 252

PostPosted: Fri Jan 28, 2005 10:25 am Reply with quote

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?
 
View user's profile Send private message Send e-mail
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Fri Jan 28, 2005 11:21 am Reply with quote

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 
View user's profile Send private message
sqzdog







PostPosted: Fri Jan 28, 2005 11:33 am Reply with quote

Man, I'm lost. I have no idea what you mean by that.
 
sixonetonoffun







PostPosted: Fri Jan 28, 2005 11:56 am Reply with quote

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







PostPosted: Fri Jan 28, 2005 12:05 pm Reply with quote

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







PostPosted: Fri Jan 28, 2005 12:30 pm Reply with quote

/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







PostPosted: Fri Jul 20, 2007 8:44 am Reply with quote

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

PostPosted: Fri Jul 20, 2007 5:43 pm Reply with quote

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. Wink

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©