valley8338 Posted June 24, 2004 Posted June 24, 2004 I was having a problem getting into my admin tool, it kept rejecting my password. So I went to disable the password.... I had originally used a contribution to secure my admin tool. This is the contribution: Quick Setup of Admin Authentication. // Open /admin/includes/application_top.php add the following code in // include authentication user/password of administration require(DIR_WS_INCLUDES . 'authen.php'); // Open /admin/includes/configure.php and add the following code in // define admin user/password define('ADMIN_USERNAME', 'admin'); define('ADMIN_PASSWORD', 'mypasword'); // Save the following PHP codes as authen.php in /admin/includes/authen.php <?php if(!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="' . TITLE . '"'); header('HTTP/1.0 401 Unauthorized'); echo $SERVER_NAME . ' Authorization Required.'; exit; } else { if (($PHP_AUTH_USER != ADMIN_USERNAME) || ($PHP_AUTH_PW != ADMIN_PASSWORD)) { header('WWW-Authenticate: Basic realm="' . TITLE. '"'); header('HTTP/1.0 401 Unauthorized'); echo $SERVER_NAME . ' Authorization Required.'; exit; } } ?> So to get rid of it, I just reversed it. I took the lines out of application_top and out of configuration, then I deleted authen.php. Now when I go to my /catalog/admin page, this is what I get: set_language($HTTP_GET_VARS['language']); } else { $lng->get_browser_language(); } $language = $lng->language['directory']; $languages_id = $lng->language['id']; } // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $language . '/' . $current_page); } // define our localization functions require(DIR_WS_FUNCTIONS . 'localization.php'); // Include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // setup our boxes require(DIR_WS_CLASSES . 'table_block.php'); require(DIR_WS_CLASSES . 'box.php'); // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // entry/item info classes require(DIR_WS_CLASSES . 'object_info.php'); // email classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // file uploading class require(DIR_WS_CLASSES . 'upload.php'); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; } else { $current_category_id = 0; } // default open navigation box if (!tep_session_is_registered('selected_box')) { tep_session_register('selected_box'); $selected_box = 'configuration'; } if (isset($HTTP_GET_VARS['selected_box'])) { $selected_box = $HTTP_GET_VARS['selected_box']; } // the following cache blocks are used in the Tools->Cache section // ('language' in the filename is automatically replaced by available languages) $cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true) ); // check if a default currency is set if (!defined('DEFAULT_CURRENCY')) { $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error'); } // check if a default language is set if (!defined('DEFAULT_LANGUAGE')) { $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error'); } if (function_exists('ini_get') && ((bool)ini_get('file_uploads') == false) ) { $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning'); } ?>Fatal error: Call to undefined function: tep_href_link() in /home/outlawro/public_html/catalog/admin/index.php on line 17 Please help!! I tried putting in a clean copy of catalog/admin/index.php, but no change!! Thanks in advance!! Val
Guest Posted June 24, 2004 Posted June 24, 2004 Replace your admin/includes/application_top.php :) Matti
Recommended Posts
Archived
This topic is now archived and is closed to further replies.