Issue - I have to login twice

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Sevenupcan
Posts: 24
Joined: Fri 29. Apr 2005, 02:44

Issue - I have to login twice

Post by Sevenupcan »

I'm sorry to take up your time again, however i just realised that i have to login twice before i can actually log into phpWCMS. The first time i login it just refreshes the page, yet if i login again, it takes me to the backend like it should.

I have searched through the forum and this may have been posted however some of the posts were in german and i was unable to read them unless using a translating programme.

No real rush to get this fixed, as i can still login, it's just a little annoying thats all.
Thanks-again for your help.
Pappnase

Post by Pappnase »

hello

wich release did you use!? 1.2.1?

try the search function und your problems will be solved!

http://www.phpwcms.de/forum/viewtopic.php?t=5777

so next time write in right forum please!
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

for double Loginproblem in 1.2.1 change this in your login.php

from

Code: Select all

// define vars
$err 		= 0;
$wcs_user 	= '';

//define language and check if language file is available
if(isset($_POST['form_lang'])) {
to

Code: Select all

// define vars
$err 		= 0;
$wcs_user 	= '';

// reset all inactive users
$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);

//define language and check if language file is available
if(isset($_POST['form_lang'])) {
this should solve the Problem
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Sevenupcan
Posts: 24
Joined: Fri 29. Apr 2005, 02:44

Post by Sevenupcan »

Thank you pico, that worked a treat. I'm sorry that this seems to be in the wrong forum, i considered this to be a bug. What caused it to do this?

Also while i did search the forum, i didn't know to search for "two tries" my instinctive keywords to search for was "login twice" so even though one can search the forums, it doesn't always show what one might expect and isn't the most reliable way to find answers.

Thanks again for your repsonse, it has fixed the login issue.
Mightyb1
Posts: 4
Joined: Tue 10. May 2005, 05:51
Location: Sacramento, California, USA

Post by Mightyb1 »

Could someone help me.

I am new to wcms.

I added the above script in the login.php and now I cannot login.

I removed it from the login.php and I still cannot login.

I am on release 1.1 RC4

ScottC
Pappnase

Post by Pappnase »

Mightyb1 wrote:Could someone help me.

I am new to wcms.

I added the above script in the login.php and now I cannot login.

I removed it from the login.php and I still cannot login.

I am on release 1.1 RC4

ScottC
hello

this is the dev. forum so you use the 1.1 RC 4 so you don't need this changes!
Mightyb1
Posts: 4
Joined: Tue 10. May 2005, 05:51
Location: Sacramento, California, USA

Still need help

Post by Mightyb1 »

I applied the script because I had to login twice.

I have at least 200 hours invested in this site, I am worried I cannot login after adding the above script to the login.php. I removed it and still cannot login.

Sorry for posting in the wrong section.

I am getting the following message after I enter my login.

Warning: Cannot modify header information - headers already sent by (output started at mydomain in headers already sent by (output started at /home/schiara1/public_html/kyesook-com/include/inc_conf/conf.inc.php:77)

ScottC.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi first upload the Original login.php to your Site

but the Error looks not that it has something to do with the login.php

maybe this will help you

http://www.phpwcms.de/forum/viewtopic.php?t=6848
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Post by rushclub »

look if there is a blank in conf.inc.php. after ?> or before <?
taht is often the case.

cheers
rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
Mightyb1
Posts: 4
Joined: Tue 10. May 2005, 05:51
Location: Sacramento, California, USA

Still need help

Post by Mightyb1 »

Found one space in the conf.inc.php that should not have been there, but it did not fix the problem.

I do not have the original login.php, I should have backed it up first.

What does that script do to the database? Is there a script that could undue what it did.

I have only opened 2 files login.php and conf.inc.php using my webhosters file edit interface, perhaps this editor has damaged one of the files.

Is the login.php generic, so that I can copy the login.php from another wcms site and overwrite the one that may be broken?

I am determined to get this fixed and need your help. I will try anything more you suggest.

Thank you very much for the help so far.

ScottC.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

the loginscript is generic - so download the 1.1RC4 from SourceForge again and unpack it then upload the login.php to your Webspace.

If this don't work download your conf.inc.php from your Webspace and open it with a 'Clean' Texteditor like MS-Notepad and look again for the Spaces - save it after correcting it and upload it to your Webspace.

Hope that you haven't change any other Files with the Webhosters Fileeditor :D
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Mightyb1
Posts: 4
Joined: Tue 10. May 2005, 05:51
Location: Sacramento, California, USA

That worked.

Post by Mightyb1 »

Pico, your good. That worked.

Thank you very much. There were 2 spaces that I could see with a local text editor.

That web based editor must have put them there.

Thanks again,
ScottC
Post Reply