Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

how to change admin password using phpmyadmin


14 replies to this topic

#1 gunfodder

  • Community Member
  • 28 posts
  • Real Name:Tim Brown
  • Gender:Male
  • Location:Kentucky

Posted 20 November 2007, 02:59

Help.
I need to change my admin password.

#2 gunfodder

  • Community Member
  • 28 posts
  • Real Name:Tim Brown
  • Gender:Male
  • Location:Kentucky

Posted 20 November 2007, 22:56

Hi.
I know everyone is very busy, but I would appreciate help with my password issue.
If it would help my site is http://www.mediaimpactlive.com
I don't have an actual link to the http://www.mediaimpactlive.com/catalog part of site as it is still under construction, but it is viewable.

So if anyone could help with letting me know what I am doing wrong for the admin password I would appreciate it.

Thank you

#3 spax

  • Community Member
  • 2,538 posts
  • Real Name:Peter

Posted 21 November 2007, 00:31

If you go to your administrators table in phpmyadmin, you will see your user name and hashed password. Copy them to a text editor - so you can put them back if need be - then delete them from the administrators table. If it works out, the next time you access your admin, it should ask you to input a new user name and password.

#4 Velveeta

  • Community Member
  • 788 posts
  • Real Name:Richard Lindsey
  • Gender:Male
  • Location:Austin, TX

Posted 21 November 2007, 00:37

Another method you can try, which I've had to do from time to time myself, is to edit your login.php page, and insert a tep_db_query() call at the beginning of it, to update your admin acct password to whatever you want to reset it to, but make sure you use tep_encrypt_password() to wrap around that text... Something like:

tep_db_query("update administrators set admin_password = '" . tep_encrypt_password('myPassword') . "' where admin_id = 1");
Or whatever your admin_id is in the admin table, and make sure you change the field names to match :) Then, just go to the login page of the admin console, it will automatically update that password for you, then you can strip that line of code back out of there, and login like normal...

Richard.
Richard Lindsey

#5 jhande

  • Community Member
  • 2,050 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 21 November 2007, 07:05

Hey Tim,

Your hosting company should be able to check on your forgotten password for you.

First thing I would do is htaccess that admin folder.

What I did to make things simple for myself since I am the only one working on the site, I used the same password as I used for the database access. Then if I ever forget or my browser for some reason doesn't remember my login, I just check the info in my catalog > includes > configure.php file.

;)
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.1 install -

#6 sash_007

  • Community Member
  • 12 posts
  • Real Name:Neophytech
  • Gender:Male

Posted 12 March 2010, 05:02

View Postspax, on 21 November 2007, 00:31, said:

If you go to your administrators table in phpmyadmin, you will see your user name and hashed password. Copy them to a text editor - so you can put them back if need be - then delete them from the administrators table. If it works out, the next time you access your admin, it should ask you to input a new user name and password.

hello following your method didnt worked for me i tried to copy paste the username password in the admin but it didnt worked

#7 multimixer

  • Community Sponsor
  • 3,592 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 12 March 2010, 06:02

Go to your phpMyAdmin and find your osCommerce Database
Find the table administrators and empty it (attention: NOT DROP but EMPTY)
Then go again to your osCommerce admin panel
You will be asked to set a new admin
Looking for a way to create your own osCommerce template ? click

#8 maydaohio

  • Community Member
  • 4 posts
  • Real Name:Mayda Sanchez
  • Gender:Female
  • Location:Ohio, United States

Posted 16 March 2010, 06:20

This solution worked for me.
post by BryceJr

#9 tfjjrrbg

  • Community Member
  • 1 posts
  • Real Name:Tim Gaudin

Posted 17 November 2010, 19:57

Brilliantly simple and clearly explained thanks!

#10 andy_1984

  • Community Member
  • 322 posts
  • Real Name:Andrew
  • Gender:Male
  • Location:Glasgow, Scotland

Posted 17 November 2010, 22:01

i found this site when i forgot the password for an old osc i wanted to modify. just put the code in to the password field via phpmyadmin and it worked like a charm

#11 JMB Designs

  • Community Member
  • 11 posts
  • Real Name:Shambi

Posted 02 December 2010, 07:46

Perfect. After hours of looking for solutions (and doing trial and error) this worked in 30 seconds!

#12 nttcar

  • Community Member
  • 35 posts
  • Real Name:nttcar

Posted 11 September 2011, 19:54

Hi I empty my admin table but when I try to login /admin It is still prompt me email /password. i am running os 2.2

#13 nttcar

  • Community Member
  • 35 posts
  • Real Name:nttcar

Posted 12 September 2011, 05:40

now I am getting the session errors, does anyone know how to fix it, it seems point to my old host server address
Warning: session_start() [function.session-start]: open(/var/www/vhosts/xxxxxx.com/httpdocs/tmp/sess_55347e64b2e5be32e9bbf541686bc179, O_RDWR) failed: No such file or directory (2)

/var/www/vhosts/xxxxxxx is there any file that might be hard coded ? please share some info

#14 DunWeb

  • Community Sponsor
  • 10,427 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 12 September 2011, 06:01

View Postnttcar, on 12 September 2011, 05:40, said:

now I am getting the session errors, does anyone know how to fix it, it seems point to my old host server address
Warning: session_start() [function.session-start]: open(/var/www/vhosts/xxxxxx.com/httpdocs/tmp/sess_55347e64b2e5be32e9bbf541686bc179, O_RDWR) failed: No such file or directory (2)

/var/www/vhosts/xxxxxxx is there any file that might be hard coded ? please share some info


You will need to update the TWO configure.php files to reflect your new path and your new database.



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#15 nttcar

  • Community Member
  • 35 posts
  • Real Name:nttcar

Posted 12 September 2011, 14:49

Warning: session_start() [function.session-start]: open(/var/www/vhosts/usaasiatrade.com/httpdocs/tmp/sess_336e1bc3dc1c9f2c46671ee48903e6e2, O_RDWR) failed: No such file or directory (2) in /hermes/web07c/b2881/moo.usaasiatradecom/usaasiatrade/httpdocs/admin/includes/functions/sessions.php on line 67

here is my includes/configure.php
<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.usaasiatrade.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'www.usaasiatrade.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/users/web/b2881/moo.usaasiatradecom/httpdocs/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
// define our database connection
define('DB_SERVER', 'usaasiatradecom.fatcowmysql.com'); // eg, localhost - should not be empty for productive servers



Here is my admin/includes/configure.php
<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.usaasiatrade.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTP_CATALOG_SERVER', 'http://www.usaasiatrade.com');
define('HTTPS_CATALOG_SERVER', '');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/home/users/web/b2881/moo.usaasiatradecom/httpdocs/'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/users/web/b2881/moo.usaasiatradecom/httpdocs/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/'); // absolute path required
define('DIR_FS_CATALOG', '/home/users/web/b2881/moo.usaasiatradecom/httpdocs/'); // absolute path required
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
Can not figure it out, any help be very appreciated