Author |
Message |
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Wed Nov 19, 2014 6:31 pm Post subject: moved servers - now register page wont load |
|
|
Hi,
my host recently moved my phpbb 2.18 forum to another server and transferred all the files. Everything works except the register function ( profile.php ?), the page does not load.
Any advice? thanks.
The host said it may be something to do with the code, which I will paste below in case its of use to you:
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
}
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
exit;
}
else if ( $mode == 'confirm' )
{
// Visual Confirmation
if ( $userdata['session_logged_in'] )
{
exit;
}
include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
exit;
} |
|
Back to top |
|
|
dogs and things Board Member
Joined: 18 Nov 2008
Posts: 628 Location: Spain
|
Posted: Wed Nov 19, 2014 6:58 pm Post subject: Re: moved servers - now register page wont load |
|
|
My guess is that your new server has a newer version of PHP running and that you will fix this problem applying the fix proposed in this post by asavage.
Tip: read that whole topic to better understand the problem. _________________ phpBB2 will never die, I hope! |
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Thu Nov 20, 2014 2:31 am Post subject: Re: moved servers - now register page wont load |
|
|
That would be my first guess as well. |
|
Back to top |
|
|
nostro Board Member
Joined: 16 Jul 2012
Posts: 54
|
|
Back to top |
|
|
Jim_UK Board Member
Joined: 19 Nov 2008
Posts: 656 Location: North West UK
|
Posted: Thu Nov 20, 2014 4:54 am Post subject: Re: moved servers - now register page wont load |
|
|
If the problem is the same that Dave experienced then the line in question in profile.php is
Code: | if ( !$userdata['session_logged_in'] && $mode == 'editprofile' ) |
and his solution was to replace "&&" with "&"
Jim |
|
Back to top |
|
|
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Thu Nov 20, 2014 6:09 am Post subject: Re: moved servers - now register page wont load |
|
|
Hi all,
thanks for the quick replies!
Jim_UK, I will try that first as that seems easiest.
If I have to implement what asavage suggested, can someone walk me through how to edit the code in the relevant php files? It seems you can do them automatically using some software or command but I'm not sure how.
My server hosting package uses cPanel.
Thanks. |
|
Back to top |
|
|
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Thu Nov 20, 2014 9:13 am Post subject: Re: moved servers - now register page wont load |
|
|
Hi all, I tried the & solution but it never worked.
|
|
Back to top |
|
|
dogs and things Board Member
Joined: 18 Nov 2008
Posts: 628 Location: Spain
|
|
Back to top |
|
|
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Thu Nov 20, 2014 1:40 pm Post subject: Re: moved servers - now register page wont load |
|
|
Hi,
I can edit individual files ok, but it seems I need to check all php files and find&replace a certain section of code. I thought I could do them all in one go with some sort of command line software? Ssh software or something?
I'm not familiar with these programmes, but is this possible? thanks |
|
Back to top |
|
|
Vendethiel Board Member
Joined: 26 Oct 2014
Posts: 251
|
Posted: Thu Nov 20, 2014 2:48 pm Post subject: Re: moved servers - now register page wont load |
|
|
I don't see how the proposed solution could ever work.
What I'm getting instead is that call-time pass-by-reference has been removed and that's failing, so a function called with a `&` parameter must have the ampersand moved to its signature. _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
|
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Thu Nov 20, 2014 4:00 pm Post subject: Re: moved servers - now register page wont load |
|
|
Vendethiel wrote: | I don't see how the proposed solution could ever work. |
Do you mean the fix suggested by asavage?
Quote: |
What I'm getting instead is that call-time pass-by-reference has been removed and that's failing, so a function called with a `&` parameter must have the ampersand moved to its signature. |
Can you clarify what I need to do to check this? Thanks. |
|
Back to top |
|
|
newbie999 Board Member
Joined: 19 Nov 2014
Posts: 8
|
Posted: Sat Nov 22, 2014 10:27 am Post subject: Re: moved servers - now register page wont load |
|
|
Would upgrading to phpbb 3 resolve this problem? |
|
Back to top |
|
|
nostro Board Member
Joined: 16 Jul 2012
Posts: 54
|
Posted: Sat Nov 22, 2014 12:16 pm Post subject: Re: moved servers - now register page wont load |
|
|
newbie999 wrote: | Would upgrading to phpbb 3 resolve this problem? |
Sure, but it will probably also create new problems for you. |
|
Back to top |
|
|
knowit Board Member
Joined: 17 Dec 2015
Posts: 7
|
Posted: Sun Dec 20, 2015 9:46 pm Post subject: Re: moved servers - now register page wont load |
|
|
We're you ever able to resolve this? If so what was the fix? My board has the same errors. Blank registration page and the call time pass by removed error. I am not a web guy so not sure what to do. Any help is most appreciated. |
|
Back to top |
|
|
Vendethiel Board Member
Joined: 26 Oct 2014
Posts: 251
|
Posted: Sun Dec 27, 2015 10:21 pm Post subject: Re: moved servers - now register page wont load |
|
|
Is there no displayed error/stack trace? _________________ Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs). |
|
Back to top |
|
|
|