View Full Version : Admin Panel Login Problems
irishterri
6-27-05, 05:12 AM
PLEASE BEAR WITH ME AS I AM A NOVICE WHEN IT COMES TO WEB DESIGN & WEB HOSTING. I HAVE DONE THE .HTACCESS & .HTPASSWD FILES CORRECTLY (I THINK) BUT WHEN I TRY TO LOG IN TO ADMIN PANEL, THE FOLLOWING MESSAGE APPEARS:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
CAN SOMEBODY PLEASE ADVISE WHAT I HAVE DONE WRONG AND EXPLAIN ASCII CODE AS I MAY NOT HAVE UPLOADED FILES IN ASCII CODE AND THAT MAY BE WHAT THE PROBLEM IS?
YOUR HELP WOULD BE GREATLY APPRECIATED.
The problem is that you have incorrectly created and/or uploaded the .htaccess and .htpasswd files. Without seeing exactly what you have done, it's impossible to say what is wrong. The two things people most often get wrong are:
1. The "require" line should look like:
require user fred
or
require valid-user
not
require fred
2. When you upload files using FTP, there are two "modes": ASCII (text) and binary. If you are using an FTP client that guesses the mode based on the file extension, it will probably get it wrong for .htaccess and .htpasswd. If you do not know how to force ASCII mode for your FTP client, rename the files htpasswd.txt and htaccess.txt, upload them that way, and then rename the files once they are uploaded (your FTP client should be able to do this, or you can use webftp.powweb.com)
irishterri
6-27-05, 12:43 PM
Thank you for your assistance. Here's to the next query.
I have uploaded files again to make sure I have done it properly but when I try to login to admin panel, I get the following message:
Warning: mysql_connect(): Unknown MySQL server host 'mysql11.powweb.com ' (1) in /www/o/obairukcom/htdocs/osCommerce/catalog/clerical/includes/functions/database.php on line 19Unable to connect to database server!
Below is text contained in database.php
<?php
/*
$Id: database.php,v 1.23 2003/06/20 00:18:30 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;
if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username, $password);
} else {
$$link = mysql_connect($server, $username, $password);
}
if ($$link) mysql_select_db($database);
return $$link;
}
function tep_db_close($link = 'db_link') {
global $$link;
return mysql_close($$link);
}
function tep_db_error($query, $errno, $error) {
die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');
}
function tep_db_query($query, $link = 'db_link') {
global $$link, $logger;
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
if (!is_object($logger)) $logger = new logger;
$logger->write($query, 'QUERY');
}
$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
if (mysql_error()) $logger->write(mysql_error(), 'ERROR');
}
return $result;
}
function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
reset($data);
if ($action == 'insert') {
$query = 'insert into ' . $table . ' (';
while (list($columns, ) = each($data)) {
$query .= $columns . ', ';
}
$query = substr($query, 0, -2) . ') values (';
reset($data);
while (list(, $value) = each($data)) {
switch ((string)$value) {
case 'now()':
$query .= 'now(), ';
break;
case 'null':
$query .= 'null, ';
break;
default:
$query .= '\'' . tep_db_input($value) . '\', ';
break;
}
}
$query = substr($query, 0, -2) . ')';
} elseif ($action == 'update') {
$query = 'update ' . $table . ' set ';
while (list($columns, $value) = each($data)) {
switch ((string)$value) {
case 'now()':
$query .= $columns . ' = now(), ';
break;
case 'null':
$query .= $columns .= ' = null, ';
break;
default:
$query .= $columns . ' = \'' . tep_db_input($value) . '\', ';
break;
}
}
$query = substr($query, 0, -2) . ' where ' . $parameters;
}
return tep_db_query($query, $link);
}
function tep_db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);
}
function tep_db_result($result, $row, $field = '') {
return mysql_result($result, $row, $field);
}
function tep_db_num_rows($db_query) {
return mysql_num_rows($db_query);
}
function tep_db_data_seek($db_query, $row_number) {
return mysql_data_seek($db_query, $row_number);
}
function tep_db_insert_id() {
return mysql_insert_id();
}
function tep_db_free_result($db_query) {
return mysql_free_result($db_query);
}
function tep_db_fetch_fields($db_query) {
return mysql_fetch_field($db_query);
}
function tep_db_output($string) {
return htmlspecialchars($string);
}
function tep_db_input($string) {
return addslashes($string);
}
function tep_db_prepare_input($string) {
if (is_string($string)) {
return trim(stripslashes($string));
} elseif (is_array($string)) {
reset($string);
while (list($key, $value) = each($string)) {
$string[$key] = tep_db_prepare_input($value);
}
return $string;
} else {
return $string;
}
}
?>
Should I be amending anything in this file.
You have a blank at the end of the mysql11.powweb.com in the configure.php define. Remove it.
irishterri
6-28-05, 04:04 PM
I deleted box and ? at end of configure.php but I still cannot log in. Below is the text which is contained in configure.php. Sorry for being such a nuisance. It is probably something very simple that I am doing wrong, do you think?
<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 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://mysite.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTP_CATALOG_SERVER', 'http://mysite.com');
define('HTTPS_CATALOG_SERVER', 'https://mysite.com');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/www/o/b/mysite.com/htdocs/osCommerce/catalog/'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/osCommerce/catalog/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/www/o/b/mysite.com/htdocs/osCommerce/catalog/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/osCommerce/catalog/'); // absolute path required
define('DIR_FS_CATALOG', '/www/o/b/mysite.com/htdocs/osCommerce/catalog/'); // 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/');
// define our database connection
define('DB_SERVER', 'mysql11.powweb.com '); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'xxx');
define('DB_SERVER_PASSWORD', 'xxxxx');
define('DB_DATABASE', 'xxxx');
define('USE_PCONNECT', 'false'); // use persisstent connections?
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'>
Well, if this is really your configure.php, it is bad, but wouldn't cause login problems. The last lines should read:
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql';
?>
Login problems are usually related to .htaccess and .htpasswd. What error are you seeing?
irishterri
6-28-05, 05:17 PM
Warning: mysql_connect(): Unknown MySQL server host 'mysql11.powweb.com ' (1) in /www/o/obairukcom/htdocs/osCommerce/catalog/clerical/includes/functions/database.php on line 19
Unable to connect to database server!
The above is the latest error message. What do you mean if this is my configure.php What should it be like? Am I likely to have problems later because of it?
I said it would be a problem because you corrupted the end of it. Also, you did not seem to take my earlier advice about the SQL server name define. You want this instead:
define('DB_SERVER', 'mysql11.powweb.com');
This is not the same as what you have, which put an extra blank at the end of the hostname.
irishterri
6-28-05, 06:21 PM
Sorry, I Did Not Understand Regarding Extra Blank - I Thought You Meant At Very End Of Configure.php. I Have Now Deleted That Correct Blank And I Can Log In To Admin Panel.
Thank You Very Much For Your Help And Patience.
I May Be Back Again On Some Other Issues With Osc. Meanwhile, I Appreciate Your Assistance And Think This Forum Is An Excellent Idea.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.