PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
sqzdog
Involved
Involved


Joined: Sep 22, 2003
Posts: 252

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

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: 2363

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

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


Joined: Sep 22, 2003
Posts: 252

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

Man, I'm lost. I have no idea what you mean by that.
View user's profile Send private message Send e-mail
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2363

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

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


Joined: Sep 22, 2003
Posts: 252

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

24 columns on the export. Where do I compare that to? If the numbers aren't equal, what do I do to fix it?
View user's profile Send private message Send e-mail
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2363

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

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


Joined: Sep 22, 2003
Posts: 252

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

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;
View user's profile Send private message Send e-mail
montego
Moderator


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

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

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
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum