Firefox PHP

Login problem with new user

Posted by mohitjain 
Login problem with new user
September 28, 2010 09:36AM
When the new user registers and then try to login, it goes to blank list.php page. How ever when the click the forum botton, they see they are logged in. This only happens when first time they try to login. After that it is fine. For old user it is not a problem. No error only warnings. Please see below for one of the warning:

Message:

PHP warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/example.com/httpdocs/phorum-5.2.15a/list.php:155)

PHP warning generated at /var/www/vhosts/example.com/httpdocs/phorum-5.2.15a/include/api/user.php:2149

Back trace:

Function setcookie called at
{path to Phorum}/include/api/user.php:2149
----
Function phorum_api_user_session_create called at
{path to Phorum}/include/api/user.php:2540
----
Function phorum_api_user_session_restore called at
{path to Phorum}/common.php:594
----
Function include_once called at
{path to Phorum}/list.php:175
----

Request info:

HTTP_HOST = example.com
HTTP_REFERER = example/phorum-5.2.15a/login.php
REQUEST_URI = /phorum-5.2.15a/list.php
Re: Login problem with new user
September 28, 2010 02:07PM
check why list.php is giving you any output in line 155.
There shouldn't be any output directly from that file.
Did you modify it? If so, reupload the original one.


Thomas Seifert
Re: Login problem with new user
September 29, 2010 12:33AM
Still the same problem after uploading the original file. Why it redirects to list.php when new user logs in, when in the case of old user it goes to index.php
Re: Login problem with new user
September 29, 2010 03:06AM
Line 155 of list.php in 5.2.15 should not have outputted any data. Not being able to login with a white screen sounds familiar though. That normally happens when the PHP version that is used is not PHP5. Please check if your server uses PHP5.

If that does not lead you anywhere, then please tell us what code is in your list.php at line 155.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Login problem with new user
September 30, 2010 12:15AM
Thanks for the reply Maurice. Yes I am using php 5. I tried one more time reloading the original. Now it give warning at list.php:166, where the command is following:


Line 166: if($page>1){
$prevpage=$page-1;
$PHORUM["DATA"]["URL"]["PREVPAGE"]=str_replace(array('%forum_id%','%page_num%'),array($PHORUM["forum_id"],$prevpage),$list_page_url_template);
}

Note this happens only first time user login, after creating an account, later it is fine. Also the URL which it redirects to is following:

example.com/phorum-5.2.15a/list.php
and when I type "?2" in front of it, like:
example.com/phorum-5.2.15a/list.php?2

I can see the normal page with user logged in

I have PM you the site link also if you want to see it in action

Thanks in advance



Following is the error:
PHP warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/example.com/httpdocs/phorum-5.2.15a/list.php:166)

PHP warning generated at /var/www/vhosts/example.com/httpdocs/phorum-5.2.15a/include/api/user.php:2149

Back trace:

Function setcookie called at
{path to Phorum}/include/api/user.php:2149
----
Function phorum_api_user_session_create called at
{path to Phorum}/include/api/user.php:2540
----
Function phorum_api_user_session_restore called at
{path to Phorum}/common.php:594
----
Function include_once called at
{path to Phorum}/list.php:186
----

Request info:

HTTP_HOST = example.com
HTTP_REFERER = [example.com]
REQUEST_URI = /phorum-5.2.15a/list.php
Re: Login problem with new user
September 30, 2010 04:14AM
That's not a white screen. That is a screen, showing only your header and footer and nothing where Phorum is supposed to show up. A really white screen is some PHP error. This is more likely a templating issue.

Did you put in your own site header unmodified in the header.tpl or did you take care of keeping the Phorum specific parts in there? Something that might be missing here, is the meta refresh code that is used for redirection. That list.php page should redirect to index.php.

Also check if you have the other required parts in there ({HEAD_TAGS}, javascript, stylesheets inside the <head> section).


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Login problem with new user
September 30, 2010 08:40AM
Thanks Maurice taking the time, I will check that part
Re: Login problem with new user
September 30, 2010 11:36PM
Thanks Maurice for pointing me in the right direction. I uploaded the original header.tpl file and modified it again, and seems like things are fine now. Thanks to you and your team for creating great software and excellent support
Re: Login problem with new user
September 30, 2010 11:55PM
Sorry spoke too soon. It only works when the user has created account when they are in the forum , if they create account when they are on forum/index.php than it does not redirect to index.php when they try to login after creating an account. Again it happens only first time after creating an account
Re: Login problem with new user
October 01, 2010 04:02AM
Please, try and change the template to the default Emerald template in your default forum settings and try again. If that works, then we know that it's a templating issue.

The list.php script that already outputted data and two times at different line numbers is still very suspicious, but I really have no clue at all what could cause that.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login