Installed a php script can't login as admin

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
Can someone help me please I installed a php script an cant access admin I'm getting "wrong password"I had instructions that I followed I created a database and a user and password , I changed config.php file to the same details and the next instruction was to log in my admin and install tables but I can't login ,someone help please
 

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
sorry for late reply this is the config file
Code:
// Server name that MySQL is on
$database_host="localhost";

// Login user
$database_login="smarter_test";

// Login password
$database_pass="test";

// Name of the MySQL database
$database_name="smarter_test";


////////////////////////////////////////////
// Website administration variables

// Admin email address to send notifications to
$admin_mail="[email protected],";

// Email address to send submission verifications from
$noreply_mail="[email protected]";

// Password to log into the administration tool
$admin_password="admin";

// Does each submission require admin approval?
// Set to "no" if admin approval is required

$admin_approved="no";


// Web site name
$site_title="Hosting Directory";

// PayPal Address
$paypal = "[email protected]";





////////////////////////////////////////////
// Don't Edit Beyond This Point
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////

// Number of columns displayed on front page
$front_cols="2";

// Width per column (pixel or percentage) on front page
// (if using pixel number, add "px" right after the number with no leading space)

$front_perc="50%";
// The last word in the name of the .css file you wish to use for your color scheme.
// Right after "style_" of the style sheet name


$image_enabled="yes";
////////////////////////////////////////////
// Result listing and ordering options
// field to list by (options are "name","id","clicks","rates","rating" or "date_added")

$list_by="name";
// Direction to list, ascending or decending (ASC or DESC)

$list_order="ASC";
// Number of records showed before paging reuslts over several pages

$category="10";
// Number of links to display on popular page

$popular="10";
// Number of links to display on new links page

$new="10";
// Number of links to display on search results page

$search="10";
////////////////////////////////////////////
// Error Messages to admin email and browser when MySQL connection and query
// errors are reported
$ConnError_Email="There was an error connecting with MySQL at $PHP_SELF";
$ConnError_Browser="There was an error connecting with MySQL";
$QueryError_Email="There was an error querying MySQL at $PHP_SELF";
$QueryError_Browser="There was an error querying MySQL";

	Function MySQLConnect($errmsg, $msg="")
	{
		$success=mysql_connect($GLOBALS["database_host"], $GLOBALS["database_login"], $GLOBALS["database_pass"]);
		if(!$success)
		{
			if($Email_Errors=="1")
			{
				mail($GLOBALS["Admin_Mail"], "MySQL Connect Failure at $Site_Name", $errmsg."\n\n".mysql_errno(). ":  ".mysql_error(), "From: $Alert_Email");
				die();
			}
		}
	}
	Function MySQLQuery($query, $errmsg, $msg="")
	{
		$success=mysql_db_query($GLOBALS["database_name"], $query);
		if(!$success)
		{
			if($Email_Errors=="1")
			{
				mail($GLOBALS["Admin_Mail"], "MySQL Query Failure at $Site_Name", $errmsg."\n\n".mysql_errno(). ":  ".mysql_error(), "From: $Alert_Email");
				echo $msg;
				die();
			}
		}
		return $success;
	}
$date_format="Y-m-d";
$display_format="M d, Y";
 

Infopro

Well-Known Member
May 20, 2003
17,113
513
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I can't help with the script itself if it's not working. But you can check that the config is correct:

Code:
// Server name that MySQL is on
$database_host="localhost";

// Login user
$database_login="[B]smarter_test[/B]";

// Login password
$database_pass="[B]test[/B]";

// Name of the MySQL database
$database_name="[B]smarter_test[/B]";
The parts in bold is what you need to edit of course.

In your cPanel > Databases section > MySQL Databases, look for the database you created listed here for this script.

If you see it here, do you see a user to the right of it? If yes then you have the Database Name and Username right there. All we need now is to know the password. Since you have a user and a database we assume, you can edit the user to set him a new password.

At bottom of page find the username for the database listed, and click it. Type in the old password and then the new password and save. If you're unsure of the old password you could, if this user is not associated with any other database, simply remove it and create a new one. But if you're not sure, create a new user and give him a new password for your script.

If you have a database, and a user associated with it and his password and have edited this script properly with those values and it still doesn't work, something else might be going on with the script. You'll need to speak with the script author about that.


HTH!
 

NetMantis

BANNED
Apr 22, 2012
116
1
66
Utah
cPanel Access Level
DataCenter Provider
Just a few comments from observations ...

It kind of sounds like to me that the user thinks the database user and the program admin are the same login.

Either the program the user is using has an initial default admin login or it likely asks for you to set one up when running the install application for that program.

Generally speaking, setting up the "config.php" for a manual installed program is usually only the first step.

If this user's hosting provider has either Softaculous or Fantastico installed, the program this user is trying to install might be available for instant automatic installation which might be a better way to go for this user.
 

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
so db user is not the same as admin user? for now i created a database ,then a database user with a password,then added the user to the database,then i changed the details inside config file and uploaded all files and folders to public_html keeping same structure (then tried to login into admin to instal tables but password didn't work)thats it
 
Last edited:

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
So that's it I didn't create a admin user. I just created a database user and I don't know how to do this I was thinking all the time that the db user is the admin user sorry if is confusing I bought 4 scripts and I just followed the instructions they provide I don't know who is the author thanks
 

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
Ok so I don't have an admin user then and I don't know how to create a admin user(I bought 4 scrips on a disc and followed the information they provided I don't know the author for this scrips)Sorry if I am confusing I'm a begginer but I trying to learn as quick as possible thanks
 

Infopro

Well-Known Member
May 20, 2003
17,113
513
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
There's really not much anyone can do for you here with this. We don't know what the script is or does, you've got no link to a company or authors website to help you.

If you've got the database properly setup, and if you've got the config file edited properly with the database details, and have set that admin password I mentioned earlier above, and if you've uploaded the files properly to the server, what happens when you open it in your browser?

Better yet, whats this script that you paid for supposed to do exactly?


This is not a cPanel issue.
 

Qazz

Member
Apr 24, 2012
9
0
51
cPanel Access Level
Website Owner
In the browser the site is working the script is meant to sell hosting
- removed link-
But I think I still need to learn a lot I don't know how to set admin nor how to install tables in the database
So that means I'm not ready to sell hosting as yet because that involves installing sites and editing Php and HTML

Sorry for being a pain and thanks for your support
What you are doing is great helping people you don't even know
Good lesson thanks
 
Last edited by a moderator:

Infopro

Well-Known Member
May 20, 2003
17,113
513
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
You're certainly welcome, not sure I helped much here as you're still stuck. I've taken a look at the link and it appears to be a theme more than a script from what I can tell. If yes, there are many more Web Hosting themes that work far better to be had elsewhere.
As one example:
Premium WordPress Themes, Web Templates, Mobile Themes | ThemeForest

If you want to go ever further, you're going to need some automation, cart, ticket system and more many popular Hosting Providers use this software:
WHMCS - The Complete Client Management, Billing & Support Solution

Software shouldn't be problematic like this one you're working with, seems to be. Might want to cut your losses and move on to something with far more support and options, and of course, ways to set Admin user easily. :p


Good luck! It only gets more fun going forward. Ask anyone here. :)
 

davidluceyesq1

Registered
May 3, 2012
1
0
51
cPanel Access Level
DataCenter Provider
The system's authentication sequence is working, since if I supply an incorrect user/password combo it generates an error message. Cleared cache and cookies repeatedly; have enabled "cookies"; have tried to login via IE, Firefox, and Netscape.
reinstalled repeatedly with same results.