phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Many functions inside the admin panel do not work anymore...
1 members found this topic helpful

 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Mon Feb 06, 2012 12:24 pm 
Post subject: Many functions inside the admin panel do not work anymore...

I dont know if it's somehow related to php upgrade or anything involving this

but I have noticed that many configuration pages inside my phpbb2 "Administration Panel" do not work, by this I mean that they are not called/redirected successfully anymore.
For example, when I click on Extreme Styles "Configuration" option on the left menu, instead of opening the configuration page... it just calls and refresh the index page of the forum, inside the frame which should open the correct page instead.
This is the same for other different admin configurations menus...regarding other mods.
This happens just for a few of these mods, of course not all.
Same result: when you call those options it just opens and refresh the forum index page in the frame that should call instead the different configuration pages.

I really don't know what happens there, but thats surely something not good icon_rolleyes.gif

EDIT: NO PHP upgrade or PHP version is involved.
I think it is somehow related to something in the 2.0.23 ---> 2.0.24 codechange upgrade
because I have just tested on an old board of mine (2.0.23) which I have (on the same server, same configuration), and there everything works fine instead, including the calling configuration pages to Extreme Syles options!! icon_sad.gif
Now I have to find out... which is the file and which code part corrupts the access to some of the admin configuration pages... I really believe it should be the index.php inside the admin folder... but I am not sure.

If someone more expert can give me a hint or a hand to find out which is the file or files involved to look in... I would be grateful. Thanks.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Tue Feb 07, 2012 4:29 am 
Post subject: Re: Many functions inside the admin panel do not work anymor

OK, I was right about the 2.0.23 --> 2.0.24 codechange update,
the problem I'm having is in the file includes/sessions.php and involves that mod.

I have reverted the codechanges from phpBB 2.0.23 to phpBB 2.0.24 mod
only for the part involving the sessions.php file
and now everything now works fine again!
So there's something, which my board doesn't like in that session.php update to 2.0.24.

TAKEN FROM
## MOD Title: phpBB 2.0.23 to phpBB 2.0.24 Code Changes
## MOD Author: Dog Cow
Code:
#
#-----[ OPEN ]---------------------------------------------
#

includes/sessions.php

#
#-----[ FIND ]---------------------------------------------
#
   if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
   {
      $session_id = md5(dss_rand());
#
#-----[ AFTER, ADD ]---------------------------------------------
#
      $priv_session_id = md5(dss_rand());
#
#-----[ FIND ]---------------------------------------------
#
         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)
#
#-----[ IN-LINE FIND ]---------------------------------------------
#
, session_admin
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------------
#
, priv_session_id
#
#-----[ FIND ]---------------------------------------------
#
         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";
#
#-----[ IN-LINE FIND ]---------------------------------------------
#
, $admin
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------------
#
, '$priv_session_id'
#
#-----[ FIND ]---------------------------------------------
#
      $sessiondata['userid'] = $user_id;
   }

   $userdata['session_id'] = $session_id;
#
#-----[ AFTER, ADD ]---------------------------------------------
#
   $userdata['priv_session_id'] = $priv_session_id;
#
#-----[ FIND ]---------------------------------------------
#
function session_pagestart($user_ip, $thispage_id)
{
   global $db, $lang, $board_config;
   global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
#
#-----[ REPLACE WITH ]---------------------------------------------
#
function session_pagestart($user_ip, $thispage_id)
{
   global $db, $lang, $board_config;
   global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID, $P_SID;
#
#-----[ FIND ]---------------------------------------------
#
         if ($ip_check_s == $ip_check_u)
         {
            $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
#
#-----[ AFTER, ADD ]---------------------------------------------
#
            $P_SID = (defined('IN_ADMIN')) ? 'p_sid=' . $userdata['priv_session_id'] : '';
#
#-----[ FIND ]---------------------------------------------
#
   global $SID;
#
#-----[ REPLACE WITH ]---------------------------------------------
#
   global $SID, $P_SID;
#
#-----[ FIND ]---------------------------------------------
#
   return $url;
}
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
   if ( !empty($P_SID) && !preg_match('#p_sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $P_SID;
   }


Anyone notice anything strange in the codechanges above?

I copy here my sessions.php, which causes the problem in some admin configuration pages:

Downoad my SESSIONS.PHP affected by the problem explained above

IF someone can have a look I would be grateful!
As for now I have reverted the changes above and everything works fine icon_smile.gif
I hope Dog Cow (author of the mod) or someone else expert, can look into it, eventually icon_smile.gif

Thanks!
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: Tue Feb 07, 2012 2:27 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

I don't see anything out of the ordinary in the code change (and as a matter of fact it's been working on my own forum for a couple years) and I don't have enough time to check your uploaded file. But in the meantime I could suggest reinstalling this part of the mod just to see if you didn't miss something when you did the changes the first time. You never know! icon_smile.gif
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Tue Feb 07, 2012 3:33 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

When I reverted the codechange above
it was intended that I had also to check the file... for correction... during the reversion icon_biggrin.gif
Otherwise I wouldnt be able to find the correct strings... as I always do cut - paste for any codechange icon_smile.gif

But its a strange behaviour anyway.... really strange...
Well, for now I will keep the 2.0.23 sessions.php
i dont think it would cause some problems...
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Tue Feb 07, 2012 8:24 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

dondino wrote:

This is the same for other different admin configurations menus...regarding other mods.
This happens just for a few of these mods, of course not all.
The phpBB admin pages work correctly, but some of the MOD pages don't?

I think that that indicates a problem with the MOD admin pages, not with sessions.php

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield ILMac 512K BlogMac GUI
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Wed Feb 08, 2012 6:07 am 
Post subject: Re: Many functions inside the admin panel do not work anymor

Dog Cow wrote:
dondino wrote:

This is the same for other different admin configurations menus...regarding other mods.
This happens just for a few of these mods, of course not all.
The phpBB admin pages work correctly, but some of the MOD pages don't?

I think that that indicates a problem with the MOD admin pages, not with sessions.php

Yes, exactly.
Only some administration pages of third-party mods/developers
Like for example:
- EXTREME STYLES MOD (CyberAlien)
- CACHE POST SYSTEM...
- and a few others.

Maybe there's some code inside those mods (admin related!), which conflict somehow with some of the codes reported in my earlier posts... with the 2.0.24 update over sessions.php.

If you have a board with Extreme Styles Mod installed, you can verify the same.

By the way... Is the 2.0.24 update of that sessions.php striktly necessary? Can I go on by just using the old sessions.php ?
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: Wed Feb 08, 2012 4:35 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

eXtreme Styles has been working fine for me (I never really use it but I can go into its control panel without a problem).
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Wed Feb 08, 2012 7:30 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

dondino wrote:

By the way... Is the 2.0.24 update of that sessions.php striktly necessary?

Yes, it is necessary.


dondino wrote:

Maybe there's some code inside those mods (admin related!), which conflict somehow with some of the codes reported in my earlier posts... with the 2.0.24 update over sessions.php.
File admin/pagestart.php contains code to redirect to the board index if the P_SID is not a part of the URL:

Code:

$p_sid = (isset($HTTP_GET_VARS['p_sid'])) ? $HTTP_GET_VARS['p_sid'] : ((isset($HTTP_POST_VARS['p_sid'])) ? $HTTP_POST_VARS['p_sid'] : '');

if ($p_sid !== $userdata['priv_session_id'])
{
   redirect("index.$phpEx?sid=" . $userdata['session_id']);
}


Chances are, some of those admin panel pages are not being loaded with the P_SID. Check the URL in your browser.


The P_SID gets added by the append_sid() function in includes/sessions.php:

Code:

function append_sid($url, $non_html_amp = false)
{
   global $SID, $P_SID;

   if ( !empty($SID) && !preg_match('#sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
   }
    if ( !empty($P_SID) && !preg_match('#p_sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $P_SID;
   }

   return $url;
}


Therefore, you must have the changes made in sessions.php!

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield ILMac 512K BlogMac GUI
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Thu Feb 09, 2012 4:30 am 
Post subject: Re: Many functions inside the admin panel do not work anymor

thanks, I will put back the 2.0.24 sessions.php anche check the link to the invalid urls
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Mon Feb 13, 2012 4:46 am 
Post subject: Re: Many functions inside the admin panel do not work anymor

I give up with this icon_sad.gif
I checked the code for its correction 3x times,
there seems to be nothing wrong in the codechange as for the 2.0.24 update, in my files.
At this point i think there might be some code inside those files changed or added by other mods which somehow cause these conflicts... but I can't struggle to try to solve this, I have not the knowledge and skills to do this icon_sad.gif

So... as for now I will still use the sessions.php without the 2.0.24 updates,
I have tested everything in the admin and it works just fine, even if all the other files are modded for 2.0.24
Back to top
Porkchop
Board Member



Joined: 17 Sep 2012

Posts: 2



PostPosted: Mon Sep 17, 2012 12:30 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

Hello everyone. I just had this issue yesterday myself with Extreme styles. I looked at the code yesterday and last night until I was blue in the face and nothing I did seemed to fix the issue. I'm fresh out of guesses.
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: Mon Sep 17, 2012 1:37 pm 
Post subject: Re: Many functions inside the admin panel do not work anymor

Are you also using 2.0.24 and did you try reverting the changes to sessions.php? Did you get the same results as dondino?
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Tue Sep 18, 2012 3:41 am 
Post subject: Re: Many functions inside the admin panel do not work anymor

I'm still using sessions.php without the edits introduced with 2.0.24 codechanges (in my #2 post in this thread)
and all is working fine in my admin panel since many months now,
if i put back the changes in sessions.php, admin panel is almost unusable icon_rolleyes.gif

so Porkchop, check if you are using 2.0.24
and just in case revert the changes made in your sessions.php file!
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 4 Hours
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0649 seconds using 16 queries. (SQL 0.0106 Parse 0.0010 Other 0.0533)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo