[2.0.11] Users can not log in

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Stefan Koopmanschap
Former Team Member
Posts: 7388
Joined: Sun Oct 28, 2001 9:47 am
Location: Woudenberg, Netherlands
Contact:

[2.0.11] Users can not log in

Post by Stefan Koopmanschap »

If you have just upgraded your phpBB forum to 2.0.11 (very good! ;) ) and you find out that users can not log in anymore and if you are using a PHP version lower than 4.1.0 and if you get the following warning:
Warning: Wrong parameter count for rtrim() in [...]functions.php on line [...]

then this is probably related to a small line of code in phpBB. A function is called that, in versions lower than PHP 4.1.0, works slightly differently. Do not be afraid, there is a simple solution to this problem!

In includes/functions.php find:

Code: Select all

	$username = htmlspecialchars(rtrim(trim($username), "\\"));
Replace with:

Code: Select all

	$username = htmlspecialchars(rtrim(trim($username)));
This should solve your problem. Here ends the message for those of you that just want to fix this. For those that want some more technical background on this issue, please read in.

OK, so why was 2.0.11 released with something not compatible with PHP versions lower than 4.1.0. It's quite simple. This was done to work around a bug in PHP 4.3.9 that could breach security. The rtrim function is therefore called with a second parameter that was not available before PHP 4.1.0. The bug has already been reported to the PHP Team.


edited to reflect the conditions more clearly
Last edited by Stefan Koopmanschap on Tue Feb 22, 2005 11:54 am, edited 1 time in total.
hvanleeuwen
Registered User
Posts: 14
Joined: Mon Mar 08, 2004 11:16 am
Contact:

Post by hvanleeuwen »

Changed the code but still getting the error "The confirmation code you entered was incorrect" when people try to register.

Anything else I can do besides downgrading??
hvanleeuwen
Registered User
Posts: 14
Joined: Mon Mar 08, 2004 11:16 am
Contact:

Post by hvanleeuwen »

I downgraded the functions.php file but the error is still there so there must be more files causing this problem
hvanleeuwen
Registered User
Posts: 14
Joined: Mon Mar 08, 2004 11:16 am
Contact:

Post by hvanleeuwen »

I downgraded usercp_register.php and now it seems to work.
Graham
Former Team Member
Posts: 8462
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK
Contact:

Post by Graham »

The error you are getting is probably nothing to do with this one. You are probably using a style that does not support visual confirmation in the registration screen.
"So Long, and Thanks for All the Fish"

phpBB Useful Links: Knowledge Base | Userguide | Forum Search | MOD Database | Styles Database
My Links: Blog!
hvanleeuwen
Registered User
Posts: 14
Joined: Mon Mar 08, 2004 11:16 am
Contact:

Post by hvanleeuwen »

I'm using Solaris by Jakob Persson.
http://www.jakob-persson.com/styles_dem ... ex.php?s=8

Is there something I can do to change this?
I guess of one knows what to edit it should be easy to adjust the template?
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

Appropriate changes ahve been posted here: http://www.phpbb.com/phpBB/viewtopic.php?t=240913
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
hvanleeuwen
Registered User
Posts: 14
Joined: Mon Mar 08, 2004 11:16 am
Contact:

Post by hvanleeuwen »

Thank you very much I take a look at it asap :)
Friend_of_Ganon
Registered User
Posts: 5
Joined: Tue Nov 02, 2004 12:35 pm

Post by Friend_of_Ganon »

Is there anyone using phpbb 2.0.11? Plz let me have a look at it. I am using phpbb 2.0.6, I think it's time for changes
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

If you're reading this topic, you're looking at 2.0.11.

The only functional difference is visual confirmation, the other changes are anywhere from urgent to tame (relatively speaking) security issues.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
sebonnevilleclub
Registered User
Posts: 23
Joined: Wed Nov 17, 2004 2:02 am
Contact:

Post by sebonnevilleclub »

my site has php BB 2.0.11 installed. you can visit it at this link [Moderator edit: site spam link removed - SamG]
Friend_of_Ganon
Registered User
Posts: 5
Joined: Tue Nov 02, 2004 12:35 pm

Post by Friend_of_Ganon »

Thanks a lot, i'll back up db and install new forum in the next some days 8)
Lord_Newbie
Registered User
Posts: 203
Joined: Fri Sep 17, 2004 5:02 pm
Location: Long Island, New York
Contact:

Post by Lord_Newbie »

I have 2.0.6 and 2.0.10. I don't intend to upgrade for a bit, but if I do, would I get the same error, or is it just with 4.1.0?
Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn »

Just with PHP versions lower than 4.1.0. And you should upgrade as soon as possible.
bcs10
Registered User
Posts: 1525
Joined: Mon Jul 14, 2003 4:45 am
Location: Chicago, IL

Post by bcs10 »

i am not sure if this falls into this topic or not... but

i updated one of my unmodded forums from 2.0.10 to 2.0.11 and now when someone checks the box next to "Log me on automatically each visit" it does not always log them in automatically...

how can i fix that???
/DD
Locked

Return to “2.0.x Support Forum”