Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I've taken over a live site and can't log in to the admin


flyboy55

Recommended Posts

Hi,

I've been tasked with making an existing osCommerce store work, but none of the admin logins given to me let me in. The store was first installed in '08.

 

I can get into the hosting acct, database, phpMyAdmin, but when I enter any of the logins to the ***/catalog/admin/ it just kicks me out and keeps asking me for UID/PWD.

 

I've added myself as a user to the password-protected directory public_html/***/catalog/admin/ and I also added myself as a user to the database but neither of those work either.

 

Hell I can't even tell what version of osCommerce is running.

 

The site is hosted at VodaHost and I know this isn't a lot of info to go on but I will supply more if needed. I just need to get access to the osCommerce admin to get the store working and begin editing products.

 

Oh and another question: when I go the catalog I get this error, "Warning: I am able to write to the configuration file: ***/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file." So I set the permission to 444 on the config.php file as suggested elsewhere here and I still get the same error. Someone advised changing permissions on BOTH config.php files but I don't know where the other one is.

 

I'd really appreciate any suggestions from ya'll!

 

Thanks,

-Mike

Link to comment
Share on other sites

@@flyboy55

 

You CAN'T add yourself as an administrator using PHPMYADMIN, the password is encrypted.

 

I suggest renaming the /admin/htaccess file and then trying to log into the admin area. If the username and password that you were given does not work, I suggest truncating the administrators table using PHPMYADMIN and then try logging in again /catalog/admin/ where you will be asked to create a new administrator username and password. Once you do this, log into the admin area normally.

 

As for the /includes/configure.php file. Change the permissions to 444 using your FTP client.

 

Chris

Link to comment
Share on other sites

@@DunWeb:

renaming the .htaccess file worked and I have access to the catalog admin, I recreated all the admin logins and they function normally even after re-naming .htaccess back to its original - thanks, I appreciate that!

 

And I did set the /catalog/includes/configure.php permissions to 444 using ftp client, but is there more than one configure.php or config.php file that needs that done?

 

Sorry to pile on but I'm not well-versed in this stuff (php) so I'm feeling my way along and have another question: How do I fix this error: "Deprecated: Function ereg() is deprecated in /catalog/admin/configuration.php on line 80"

 

I don't think I can simply delete that line b/c it's nested within another function:

 

$configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order");

while ($configuration = tep_db_fetch_array($configuration_query)) {

if (tep_not_null($configuration['use_function'])) {

$use_function = $configuration['use_function'];

if (ereg('->', $use_function)) {

$class_method = explode('->', $use_function);

if (!is_object(${$class_method[0]})) {

include(DIR_WS_CLASSES . $class_method[0] . '.php');

${$class_method[0]} = new $class_method[0]();

}

$cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});

} else {

$cfgValue = tep_call_function($use_function, $configuration['configuration_value']);

}

} else {

$cfgValue = $configuration['configuration_value'];

}

 

Has that function been renamed or? What would you suggest?

 

Thanks much again, in advance!

-Mike

Link to comment
Share on other sites

@@DunWeb:

renaming the .htaccess file worked and I have access to the catalog admin, I recreated all the admin logins and they function normally even after re-naming .htaccess back to its original - thanks, I appreciate that!

 

And I did set the /catalog/includes/configure.php permissions to 444 using ftp client, but is there more than one configure.php or config.php file that needs that done?

 

Sorry to pile on but I'm not well-versed in this stuff (php) so I'm feeling my way along and have another question: How do I fix this error: "Deprecated: Function ereg() is deprecated in /catalog/admin/configuration.php on line 80"

 

I don't think I can simply delete that line b/c it's nested within another function:

 

$configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order");

while ($configuration = tep_db_fetch_array($configuration_query)) {

if (tep_not_null($configuration['use_function'])) {

$use_function = $configuration['use_function'];

if (ereg('->', $use_function)) {

$class_method = explode('->', $use_function);

if (!is_object(${$class_method[0]})) {

include(DIR_WS_CLASSES . $class_method[0] . '.php');

${$class_method[0]} = new $class_method[0]();

}

$cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});

} else {

$cfgValue = tep_call_function($use_function, $configuration['configuration_value']);

}

} else {

$cfgValue = $configuration['configuration_value'];

}

 

Has that function been renamed or? What would you suggest?

 

Thanks much again, in advance!

-Mike

Link to comment
Share on other sites

@@DunWeb:

 

I found the fix for the deprecated ereg() and eregi() functions so those are all good now.

 

However, it's really weird, when I try to change the permissions for the configuration files, I change it in the dialogue to 444 but when I hit okay it just reverts to 644, the change just does not take for some reason. What the hell?

Link to comment
Share on other sites

@@flyboy55

 

Mike,

 

use your hosting providers control panel to set the file permissions. Some hosts don't allow for remote permissions to be set, so you have to use thier interface.

 

 

 

Chris

Link to comment
Share on other sites

  • 6 months later...

@@flyboy55

 

You CAN'T add yourself as an administrator using PHPMYADMIN, the password is encrypted.

 

I suggest renaming the /admin/htaccess file and then trying to log into the admin area. If the username and password that you were given does not work, I suggest truncating the administrators table using PHPMYADMIN and then try logging in again /catalog/admin/ where you will be asked to create a new administrator username and password. Once you do this, log into the admin area normally.

 

As for the /includes/configure.php file. Change the permissions to 444 using your FTP client.

 

Chris

 

 

Hello Chris,

I have much the same problem. I have had my osCommerce files removed from the directory wrapper by a tech of my hosting service, iPower. That his not been the problem until I had them move the files to a new more private single host to have several upgrades put in place.

 

I have had several problems and they are difficult to get a rapid response from but most have been fixed. The admin access UID and Password is not available through mysite.com/catalog/admin/password.php? I do not have a simple .htaccess mine is .htaccess_oscommerce I tried dropping the e off the name and following your advice. Still nothing.

 

Any ideas?

 

Charles H

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...