PHP Forums Archive

The login script stopped working

Tags: login, session, redirect, error msg

kachar posted on 2008-05-25 15:41:06 #

The login script stopped working. When i try to login with the correct user and pass it just refreshes the login page without any information message. But if i write not valid user or pass it is displaying the error msg.

What can be the problem? It happens on 2 different sites where i'm using the script.

10x in advance

Comments / discussions

Olaf posted on 2008-05-25 15:47:19 #

Hi,

it stops working without that you have changed something?

if yes contact your web hosting provider first ;)

kachar posted on 2008-05-25 15:53:16 #

hi,

i thought it is from the ISP but i dont know what should be the configuration, what i should tell them to change to normal.

Can it be from cookies, session ?

Olaf posted on 2008-05-25 18:09:34 #

difficult to say, but you need to check the session and cookie part.

Olaf posted on 2008-05-25 18:30:08 #

I use this default settings:

Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0

but it could be also some header problem...

kachar posted on 2008-05-25 19:42:59 #

its strange really.

here's mine phpinfo session's:

Session Support 	enabled
Registered save handlers 	files user 

Directive	Local Value	Master Value
session.auto_start	Off	Off
session.bug_compat_42	Off	Off
session.bug_compat_warn	On	On
session.cache_expire	180	180
session.cache_limiter	nocache	nocache
session.cookie_domain	no value	no value
session.cookie_lifetime	0	0
session.cookie_path	/	/
session.cookie_secure	Off	Off
session.entropy_file	no value	no value
session.entropy_length	0	0
session.gc_divisor	1000	1000
session.gc_maxlifetime	1440	1440
session.gc_probability	1	1
session.name	PHPSESSID	PHPSESSID
session.referer_check	no value	no value
session.save_handler	files	files
session.save_path	/tmp	/tmp
session.serialize_handler	php php_binary wddx	php php_binary wddx
session.use_cookies	On	On
session.use_only_cookies	Off	Off
session.use_trans_sid	Off	Off

kachar posted on 2008-05-25 19:46:53 #

is there a way to manually test, to see which one is the missing part ?

any suggestions accepted :)

Olaf posted on 2008-05-25 19:50:37 #

I'm sorry I can't suggest what to do.

I had similar problems a few years ago because I tried to cheap hosting offers ;)

first try, if session exists:

session_start();
$_SESSION['test'] = 'test value';

print_r($_SESSION);

kachar posted on 2008-05-26 04:41:42 #

thanks

notuo posted on 2008-07-22 17:29:19 #

Hi.

I just started with this class and got the very same issue (login kept displaying always). After I defined define("USE_MYSQL_SESSIONS", false); in the db_config file. I started to play with the class.

Olaf posted on 2008-07-22 18:32:55 #

@notuo,

do you have any problem with that class?

notuo posted on 2008-07-22 19:53:33 #

Yes. I had. Just the same stated here.

I started last week in a a local xampp installation but I had too many problems with the emailing (not on your side) So I started today to do my tests in a live server and got the very same issue: login told me when the password was wrong but if I type everything ok nothing else happened, the same login appeared over and over again. (all of this after the register, emailing, confirmation, etc. even after I change may password again).

Then I came for help and found this thread and then I changed the uses sessions as stated before and now I can use the class.

Do you need more info?

Regards

Olaf posted on 2008-07-22 20:26:44 #

great that it works for you.