Hi guys,
It's nearly 2 o'clock and I have to wake up early "tomorrow". I made a very big patch that cleans up a lot of code (thousands of tabs, bad indentation, etc. and follows the CODING_STANDARD we wrote together.
Of course I didn't had time to clean up every single line of code (I didn't wanted to use any automated mean to do the cleanup to avoid problems).
As for the login problem I re-read most of the code and I runned it with all compatibility options turned off and all warnigns turned on and it works very well on my local system. I think there is still one $current occurence somewhere but the problem doesn't come from here.
As for the online version that doesn't work, I think that first thing would be to put a test page on the server with phpinfo() in it to know exactly what version of php and what options we are using.
Then we have to understand why in function cmd_do_login() of file account.php we have something like:
if($result == null) { $_SESSION['current'] = $user; addmsg("You are successfully logged in as '$user->username'.", "green"); redirect(apidb_fullurl("index.php")); } else { retry("login","Login failed ($result)"); $_SESSION['current'] = ""; }
And when providing a wrong password we get the error message and when providing a good password we get no message at all ! The reason why it's buggy online and works locally using the latest cvs versions is still to be found...
Finally there are still some register_globals to clean up and when we are done we can turn off the following options in php.ini: short_open_tag = Off session.bug_compat_42 = 0 register_globals = Off register_long_arrays = Off
P.S. I send a copy to wine-devel in case someone finds out the solution before us.
I noticed that if I put:
session.use_cookies = 0
In my php.ini I cannot login and the behaviour is the same as the one on the website. maybe someone could check if the online server configuration has changed.
Tony could you check if you have this option enabled or not on your local server ?
On Sat, 2004-12-11 at 18:52, Jonathan Ernst wrote:
Finally there are still some register_globals to clean up and when we are done we can turn off the following options in php.ini: short_open_tag = Off session.bug_compat_42 = 0 register_globals = Off register_long_arrays = Off
Actually, you can add: php_value register_globals 0 to .htaccess to disable it per site.
Just a tip.
Thanks for the tip Jeremy.
Chris Morgan and myself don't have this problem locally this was tested using php 4.3.9 and php 5.x
Tony Lambregts has the same version of php as the online server 4.2.2 and has the same problem. After a lot of testingand googling he found out that he had an extra carriage return at the end of his includes/config.php file and thus there was a problem with the sessions (because headers cannot be sent). Could you check if the config.php has an extra carriage return ?
If not, could you maybe enable error reporting to see if php is trowing some errors about sessions or cookies.
Thank you.
Le dimanche 12 décembre 2004 à 11:14 -0600, Jeremy Newman a écrit :
On Sat, 2004-12-11 at 18:52, Jonathan Ernst wrote:
Finally there are still some register_globals to clean up and when we are done we can turn off the following options in php.ini: short_open_tag = Off session.bug_compat_42 = 0 register_globals = Off register_long_arrays = Off
Actually, you can add: php_value register_globals 0 to .htaccess to disable it per site.
Just a tip.