The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installed a php script can't login as admin

Discussion in 'General Discussion' started by Qazz, Apr 24, 2012.

  1. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Whats the script called? Might be helpful.
     
  3. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hosting 5 I don't know if that means anything thanks
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    It doesn't sorry. Got a link to the script authors page, or can you attach the unedited (none of your details are in it) config file to this thread to peek at?
     
  5. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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="contact@you.com,";
    
    // Email address to send submission verifications from
    $noreply_mail="contact@you.com";
    
    // 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 = "you@you.com";
    
    
    
    
    
    ////////////////////////////////////////////
    // 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";
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    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!
     
  7. NetMantis

    NetMantis BANNED

    Joined:
    Apr 22, 2012
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    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.
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    No clue what the admin login looks like but in that config file is this detail:

    So there's where you'll set the admin password it seems.
     
  9. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #9 Qazz, Apr 25, 2012
    Last edited: Apr 25, 2012
  10. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    so admin user is not the same as database user?
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Admin user should never be the same as the database user.

    You really should try and contact the author of the script for assistance with it.
     
  12. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  13. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    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.
     
  15. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #15 Qazz, Apr 27, 2012
    Last edited by a moderator: Apr 27, 2012
  16. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    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. :)
     
  17. Qazz

    Qazz Member

    Joined:
    Apr 24, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Once again thank you I'll try the links you gave me and will see you soon
     
  18. davidluceyesq1

    davidluceyesq1 Registered

    Joined:
    May 3, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page