If your website file is inside of htdocs then use default
C:\xampp\php\php.exe -f C:\xampp\htdocs\cron\cron.php
else
C:\xampp\php\php.exe -f C:\xampp\htdocs\Directory_Name\cron\cron.php
etc etc
Printable View
Thanks 4FUNer :)
http://i.imgur.com/b7j4jAo.png
4FUNer Release Free Modules or template Please? :)
- - - Updated - - -
Share your Header Please :)
- - - Updated - - -
Hey 4FUNer Share Blank Header please?
My problems.
ERROR: The Administrator has disabled new registrations. ( ANY PAGES)
OTHER:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\modules\news.php on line 84
@mustt
try enable the registrations in admincp modulemanager and post news
@daeron91 I can not access the admin panel, I go to the link "localhost/admincp" and it redirects me to "localhost/admincp/page=admincp!
with 404 not found.
anyone can share ,,,header for premium template :( please thanks a lot godbless
@Wayne Sniper
When I type the link of the admin panel, I am redirected to "localhost/admincp/page=admincp!
I can not even enter login and password, it simply generates 404 NOT FOUND page.
Is there any way to disable the MD5?
there's already a solution posted earlier, please read more.
New Error.
(On Register)
[SQL 22007] [odbc 242]> [Microsoft] [ODBC SQL Server Driver] [SQL Server] The talk of a varchar data type to a datetime data type resulted in an out of range value. (SQLExecute [242] at ext \ pdo_odbc \ odbc_stmt.c: 254)
- - - Updated - - -
New Error.
(On Register)
[SQL 22007] [odbc 242]> [Microsoft] [ODBC SQL Server Driver] [SQL Server] The talk of a varchar data type to a datetime data type resulted in an out of range value. (SQLExecute [242] at ext \ pdo_odbc \ odbc_stmt.c: 254)
try this bro copy and replace to includes>classes>classlogin.php
Code:<?php
class login {
function isLoggedIN() {
global $_SESSION,$dB;
if($_SESSION['valid'] == true) {
if(check_value($_SESSION['userid']) && check_value($_SESSION['username'])) {
if($this->checkActiveSession($_SESSION['userid'],session_id())) {
$this->updateActiveSessionTime($_SESSION['userid']);
} else {
$this->logout();
return;
}
if(mconfig('enable_session_timeout')) {
if($this->isSessionActive($_SESSION['timeout'])) {
$_SESSION['timeout'] = time();
return true;
} else {
$this->logout();
return;
}
} else {
return true;
}
}
}
}
function validateLogin($username,$password) {
global $common,$_SERVER;
if(check_value($username) && check_value($password)) {
//if($this->canLogin($_SERVER['REMOTE_ADDR'])) {
if($common->userExists($username)) {
if($common->validateUser($username,$password)) {
$this->removeFailedLogins($_SERVER['REMOTE_ADDR']);
session_regenerate_id();
$_SESSION['valid'] = true;
$_SESSION['timeout'] = time();
$_SESSION['userid'] = $common->retrieveUserID($username);
$_SESSION['username'] = $username;
// ACTIVE SESSIONS
$this->deleteActiveSession($_SESSION['userid']);
$this->addActiveSession($_SESSION['userid'],$_SERVER['REMOTE_ADDR']);
if(check_value($_SESSION['login_last_location'])) {
redirect(1,$_SESSION['login_last_location']);
} else {
redirect(1,'usercp/');
}
} else {
// invalid password
$this->addFailedLogin($username,$_SERVER['REMOTE_ADDR']);
message('error', lang('error_1',true));
message('warning', $this->checkFailedLogins($_SERVER['REMOTE_ADDR']) . lang('warning_1b',true) . mconfig('max_login_attempts'), lang('warning_1a',true));
}
} else {
// invalid username
message('error', lang('error_2',true));
}
//} else {
// // user is timed out
//message('error', lang('error_3',true));
//}
} else {
// user didn't complete a field
message('error', lang('error_4',true));
}
}
function canLogin($ipaddress) {
global $dB,$common;
if(Validator::Ip($ipaddress)) {
$fl = $this->checkFailedLogins($ipaddress);
if($fl >= mconfig('max_login_attempts')) {
$result = $dB->query_fetch_single("SELECT * FROM "._TBL_FLA_." WHERE ip_address = '$ipaddress' ORDER BY id DESC");
if(is_array($result)) {
if(time() > $result['unlock_timestamp']) {
$this->removeFailedLogins($ipaddress);
return true;
} else {
return false;
}
} else {
return true;
}
} else {
return true;
}
} else {
return false;
}
}
function checkFailedLogins($ipaddress) {
global $dB;
if(Validator::Ip($ipaddress)) {
$result = $dB->query_fetch_single("SELECT * FROM "._TBL_FLA_." WHERE ip_address = '$ipaddress' ORDER BY id DESC");
if(is_array($result)) {
return $result['failed_attempts'];
} else {
return false;
}
} else {
return false;
}
}
function addFailedLogin($username,$ipaddress) {
global $dB,$common,$config;
if(!Validator::UsernameLength($username)) { $error = true; }
if(!Validator::AlphaNumeric($username)) { $error = true; }
if(!Validator::Ip($ipaddress)) { $error = true; }
if(!$common->userExists($username)) { $error = true; }
if(!$error) {
$n = $this->checkFailedLogins($ipaddress);
$timeout = time() + mconfig('failed_login_timeout') * 60;
if(!$n) {
$data = array($username, $ipaddress, 0, 1, time());
$dB->query("INSERT INTO "._TBL_FLA_." (username, ip_address, unlock_timestamp, failed_attempts, timestamp) VALUES (?, ?, ?, ?, ?)", $data);
} else {
$new_n = $n + 1;
if($new_n >= mconfig('max_login_attempts')) {
$dB->query("UPDATE "._TBL_FLA_." SET username = '$username', ip_address = '$ipaddress', failed_attempts = '$new_n', unlock_timestamp = '$timeout', timestamp = '".time()."' WHERE ip_address = '$ipaddress'");
} else {
$dB->query("UPDATE "._TBL_FLA_." SET username = '$username', ip_address = '$ipaddress', failed_attempts = '$new_n', timestamp = '".time()."' WHERE ip_address = '$ipaddress'");
}
}
}
}
function removeFailedLogins($ipaddress) {
global $dB;
if(Validator::Ip($ipaddress)) {
$dB->query("DELETE FROM "._TBL_FLA_." WHERE ip_address = '$ipaddress'");
}
}
function isSessionActive($session_timeout) {
if(check_value($session_timeout)) {
$offset = time() - $session_timeout;
if($offset < mconfig('session_timeout')) {
return true;
} else {
return false;
}
} else {
return false;
}
}
function logout() {
$_SESSION = array();
session_destroy();
redirect();
}
private function deleteActiveSession($userid) {
global $dB;
$delete = $dB->query("DELETE FROM WEBENGINE_ACTIVE_SESSIONS WHERE session_user_id = ?", array($userid));
}
private function addActiveSession($userid,$ipaddress) {
global $dB;
$add = $dB->query("INSERT INTO WEBENGINE_ACTIVE_SESSIONS (session_user_id,session_id,session_ip,session_time) VALUES (?,?,?,?) ", array($userid,session_id(),$ipaddress,time()));
if($add) {
return true;
}
}
private function checkActiveSession($userid,$session_id) {
global $dB;
$check = $dB->query_fetch_single("SELECT * FROM WEBENGINE_ACTIVE_SESSIONS WHERE session_user_id = ? AND session_id = ?", array($userid,$session_id));
if($check && is_array($check)) {
return true;
}
}
private function updateActiveSessionTime($userid) {
global $dB;
$update = $dB->query("UPDATE WEBENGINE_ACTIVE_SESSIONS SET session_time = ? WHERE session_user_id = ?", array(time(),$userid));
if($update) {
return true;
}
}
}
?>
@clerigz
your modification only disabled the ip blocking and session timeout :thumbdown:
his problem is clearly in registration, the code you give him has nothing to do with his problem lol!
mustt problem is because in his MEMB_INFO table the date tables are type datetime and this web register query as that as text (type varchar).... so he need to update the register query