phpwcms Login problem again !!
login problem
Hi :
Recommend you place this thread in the announcements. I also had the same problem. A lot of people are going to be looking for this thread!
thanks
Recommend you place this thread in the announcements. I also had the same problem. A lot of people are going to be looking for this thread!
thanks
Hallelujah!!!!
YES YES YES
Thanks Oliver!
this file is EXCELLENT --> that change made the admin part WORK also on IEXPLORER !!!
You should include it in next releases!
Since I'm using PHPWCMS, my problem was that I had to say to pple or use myself Firefox or Mozilla to use the admin backend, I had this login prob with Explorer, couldn't find why.
This is like penicilline, you didn't do that in order to fix that, but it does it.
YIIIIIIIIPIEEEEEEEEEEEEEEEE, hurray, hurray
Cheers
Thanks Oliver!
this file is EXCELLENT --> that change made the admin part WORK also on IEXPLORER !!!
You should include it in next releases!
Since I'm using PHPWCMS, my problem was that I had to say to pple or use myself Firefox or Mozilla to use the admin backend, I had this login prob with Explorer, couldn't find why.
This is like penicilline, you didn't do that in order to fix that, but it does it.
YIIIIIIIIPIEEEEEEEEEEEEEEEE, hurray, hurray
Cheers
1.3 out, testing, testing...
Sponsoring 4 phpwcms Blog and Usermanagement
Sponsoring 4 phpwcms Blog and Usermanagement
I was happy too soon it seems...
Wow, now it appears that it works on IE but not in Mozilla/Forefox anymore
Should there be a script that says if agent is Mozilla/Firefox do ... checklogin.inc.php (the old file) and
if agent is Explorer (the new file) do that? Or even better one that handles the two?
I'm no LAMP guru, just a simple user.
Anyone?
Thanks
1.3 out, testing, testing...
Sponsoring 4 phpwcms Blog and Usermanagement
Sponsoring 4 phpwcms Blog and Usermanagement
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Hi Oliver,
What happens is this:
I never could have the login.php work with Explorer. Since you made the new checklogin.php it does!
BUT...
Now, when I try with Firefox/Mozilla it doesn't work anymore.
I did this and works on both (I don't know if it is a good way but it works now on both navigators):
It works!
I repeat, don't know if it is the proper way, but does the job!
What do you think about it?
Thanks
What happens is this:
I never could have the login.php work with Explorer. Since you made the new checklogin.php it does!
BUT...
Now, when I try with Firefox/Mozilla it doesn't work anymore.
I did this and works on both (I don't know if it is a good way but it works now on both navigators):
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system is
free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
// I added this line (to check IE):
if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE"))
{
//Aktualisieren der Userliste bzgl. der eingeloggten Zeit, Notfalls deaktivieren
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET ".
$sql .= "logged_in = 0, logged_change = '".time()."' ";
$sql .= "WHERE logged_in = 1 AND ( ".time()." - logged_change ) > ".$phpwcms["max_time"];
mysql_query($sql, $db);
if(!empty($_SESSION["wcs_user"])) {
$sql = "SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_userlog ";
$sql .= "WHERE logged_user='".aporeplace($_SESSION["wcs_user"])."' AND logged_in=1";
if($check = mysql_query($sql, $db)) {
if($row = mysql_fetch_row($check)) {
if($row[0] == 0) {
$_SESSION["wcs_user"] = "";
} else {
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET ";
$sql .= "logged_change=".time()." WHERE ";
$sql .= "logged_user='".aporeplace($_SESSION["wcs_user"])."' AND logged_in=1";
mysql_query($sql, $db);
}
mysql_free_result($check);
}
}
}
if(empty($_SESSION["wcs_user"])) {
session_destroy();
header("Location: ".$phpwcms["site"].$phpwcms["root"]."login.php");
exit();
}
}
// I added the former file (that worked with Mozilla and Firefox):
else {
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET logged_in = 0, logged_change = UNIX_TIMESTAMP( NOW( ) ) ".
"WHERE logged_in = 1 AND ( UNIX_TIMESTAMP( NOW( ) ) - logged_change ) > ". $phpwcms["max_time"].";";
mysql_query($sql, $db);
if($_SESSION["wcs_user"]) {
$sql = "SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_userlog WHERE logged_user='".$_SESSION["wcs_user"]."' AND logged_in=1;";
if($check = mysql_query($sql, $db)) {
if($row = mysql_fetch_row($check)) {
if($row[0] == 0) {
$_SESSION["wcs_user"] = "";
} else {
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET logged_change=".
time()." WHERE logged_user='".$_SESSION["wcs_user"]."' AND logged_in=1;";
$check = mysql_query($sql, $db);
}
}
}
}
if (!isset($_SESSION["wcs_user"]) || !$_SESSION["wcs_user"]) {
session_destroy();
header("Location: ".$phpwcms["site"].$phpwcms["root"]."login.php");
exit();
}
}
?>
I repeat, don't know if it is the proper way, but does the job!
What do you think about it?
Thanks
1.3 out, testing, testing...
Sponsoring 4 phpwcms Blog and Usermanagement
Sponsoring 4 phpwcms Blog and Usermanagement
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
You have used a buggy checklogin.inc.php (sorry). Compare 1st SQL line. Is solved in upgraded dev release I published yesterday midday.
Oliver
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system is
free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
//Aktualisieren der Userliste bzgl. der eingeloggten Zeit, Notfalls deaktivieren
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET "; // <--- SEE HERE
$sql .= "logged_in = 0, logged_change = '".time()."' ";
$sql .= "WHERE logged_in = 1 AND ( ".time()." - logged_change ) > ".$phpwcms["max_time"];
mysql_query($sql, $db);
if(!empty($_SESSION["wcs_user"])) {
$sql = "SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_userlog ";
$sql .= "WHERE logged_user='".aporeplace($_SESSION["wcs_user"])."' AND logged_in=1";
if($check = mysql_query($sql, $db)) {
if($row = mysql_fetch_row($check)) {
if($row[0] == 0) {
$_SESSION["wcs_user"] = "";
} else {
$sql = "UPDATE ".DB_PREPEND."phpwcms_userlog SET ";
$sql .= "logged_change=".time()." WHERE ";
$sql .= "logged_user='".aporeplace($_SESSION["wcs_user"])."' AND logged_in=1";
mysql_query($sql, $db);
}
mysql_free_result($check);
}
}
}
if(empty($_SESSION["wcs_user"])) {
session_destroy();
header("Location: ".$phpwcms["site"].$phpwcms["root"]."login.php");
exit();
}
?>
Yes, works fine what a ";" can do
It is because I downloaded the
Now works ok.
Thanks again! Thus, I repeat:
YIPIEEEEEEEE HURRRAAAAAAAAY
It is because I downloaded the
In your post, that file seems buggy...Rename old checklogin.inc.php, download, unzip and put new file in "include/inc_lib":
http://www.phpwcms.de/support/checklogin.inc.zip
Now works ok.
Thanks again! Thus, I repeat:
YIPIEEEEEEEE HURRRAAAAAAAAY
1.3 out, testing, testing...
Sponsoring 4 phpwcms Blog and Usermanagement
Sponsoring 4 phpwcms Blog and Usermanagement
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
-
- Posts: 8
- Joined: Mon 7. Feb 2005, 05:07
Hiya OG,
I have the tried
a higer "max_time" (5800000) in conf.inc.php
editing my php.ini file to match (5800000)
upgraded to your new checklogin file
but I still get logged out. their isn't really an amount of time that it happens
but it does it all the time every session. I a matter of 10 min's I get loggeed out about 10-15 times.
please help.......
I have the tried
a higer "max_time" (5800000) in conf.inc.php
editing my php.ini file to match (5800000)
upgraded to your new checklogin file
but I still get logged out. their isn't really an amount of time that it happens
but it does it all the time every session. I a matter of 10 min's I get loggeed out about 10-15 times.
please help.......
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
-
- Posts: 8
- Joined: Mon 7. Feb 2005, 05:07
(remote)
Linux
PhPwcms 1.9 Dev
PHP Version 4.3.10
MSQL Version 4.1.7
register_globals: on
session.use_trans_sid: off
Used to access phpwcms :
(local)
tested on 4 different computers all-
windows XP professional
browsers used "Internet Explorer, Firefox"
no fire walls or firewalls disabled.
Linux
PhPwcms 1.9 Dev
PHP Version 4.3.10
MSQL Version 4.1.7
register_globals: on
session.use_trans_sid: off
Used to access phpwcms :
(local)
tested on 4 different computers all-
windows XP professional
browsers used "Internet Explorer, Firefox"
no fire walls or firewalls disabled.
Last edited by liquiqvisions on Mon 14. Feb 2005, 05:16, edited 2 times in total.
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact: