Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

please help-can not log in


Recommended Posts

My attemp to modofi the login/logout comes to complete failure


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/jesphoto/public_html/osCommerce/catalog/admin/LoginAction.php on line 21


Warning: Cannot modify header information - headers already sent by (output started at /home/jesphoto/public_html/osCommerce/catalog/admin/LoginAction.php:21) in /home/jesphoto/public_html/osCommerce/catalog/admin/LoginAction.php on line 26


Warning: Cannot modify header information - headers already sent by (output started at /home/jesphoto/public_html/osCommerce/catalog/admin/LoginAction.php:21) in /home/jesphoto/public_html/osCommerce/catalog/admin/LoginAction.php on line 28


This is what I get to try to log in.

I checked couple of time my typing and can not find what I did wrong

HELP!!!! please

Link to comment
Share on other sites



please post the lines around line 21 from your file




// Include application configuration parameters


// include the database functions

require(DIR_WS_FUNCTIONS . 'database.php');

// make a connection to the database... now

tep_db_connect() or die('Unable to connect to database server!');



// Check if the information has been filled in

if(($psName == "") || ($psPassword == "")) {

// No login information

header('Location: ' . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN . 'login.php?refer='.urlencode($psRefer));

} else {

// Authenticate user

$psName = addslashes($psName);

$psPassword = addslashes($psPassword);

$sQuery = "SELECT ID, MD5(UNIX_TIMESTAMP() + ID + RAND(UNIX_TIMESTAMP())), sGUID FROM administrator WHERE (sName = '$psName') AND (sPassword = password('$psPassword'))";

$hResult = mysql_query($sQuery);

if(mysql_affected_rows()) {

$aResult = mysql_fetch_row($hResult);

// Update the user record

$sQuery = "UPDATE administrator SET sGUID = '" . addslashes($aResult[1]) . "' WHERE ID = '" . addslashes($aResult[0]) . "'";


// Set the cookie and redirect

setcookie("session_id", $aResult[1]);

if(!$psRefer) $psRefer = HTTPS_CATALOG_SERVER . DIR_WS_ADMIN . 'index.php';

header('Location: ' . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN . 'index.php');

} else {

// Not authenticated

header('Location: ' . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN . 'login.php?refer='.urlencode($psRefer));






I was not shure with it is line 21 so I got it all here

Link to comment
Share on other sites

I am having the same problem. The officel thread fo the contrib is Here


I went to that thread and did not found nothing what can help me, instead I found a boumch of people

with similar problem and unresolved. I understand that here are some users who know something about php

but (from what I saw) most of users do not know php to fix the problem.

The question is - why would some one post not working contribution?

Maybe the author assumed that we all know how to fix it?

Lucky me - I did back up some files so I can roll back to original.

All what I wanted is the logoff button

Link to comment
Share on other sites

I am trying Administration Access Level Accounts 2.0 which has login/off.

I get SQL errors after troubleshooting some code

1146 - Table 'beachgla_osC.admin' doesn't exist

select admin_id as login_id, admin_groups_id as login_groups_id, admin_firstname as login_firstname, admin_email_address as login_email_address, admin_password as login_password, admin_modified as login_modified, admin_logdate as login_logdate, admin_lognum as login_lognum from admin where admin_email_address = 'admin@localhost'


so it could just be our server config of previously installed contribs messing this up.

Link to comment
Share on other sites

I have the contrib working on my testing server(Win Longhorn Server PHP 5 MySQL 5 an the new stuff.). Thst works fine but once it touches my old test server (FreeBSD 4.11 [exact replica of the iPowerWeb server]) It does not work. It might be something with the OS it is on. Not sure.

Link to comment
Share on other sites


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

  • Create New...