vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   MrZeropage Can you step in please (https://vborg.vbsupport.ru/showthread.php?t=269414)

Hippy 08-30-2011 07:32 PM

MrZeropage Can you step in please
 
MrZeropage once again thanks for providing this mod to everyone here (we all luv it)
The biggest issue ATM with the newest vb and the ibproarcade is the holdsession.php stopped working .. you need to have the remember me ticked or you get logged out of the forum when going to play a game.... so , you are playing the game then finish and submit your score your logged out..
or if you click on a game and then try to View High Scores your logged out


a fix for this would be greatly appreciated..By everyone that uses this mod
Regards
Ron

Mark.B 08-30-2011 08:27 PM

Hmm just done some playing with this...didn't even know it was an issue since my board has always had the box ticked by default.

Anyway....try changing that "echo" line to this:
Code:

echo '<meta http-equiv='refresh' content='$secs; URL=$vboptions[bburl]/holdsession.php$session[sessionurl_q]act=arcade&do=play&gameid=$gameid'>';

That seems to be working for me, whereas I was able to replicate the issue before by unticking the box.

Certainly the syntax was all wrong before.

Hippy 08-30-2011 08:45 PM

thanks Mark I will test it out ..

as mine has always been ticked by default as well.. but I am looking to improve it for others..
Peek in this forum, I been helping out for some time, I was determined to keep this mod alive..
I will report back..


thanks
Hippy

--------------- Added [DATE]1314741199[/DATE] at [TIME]1314741199[/TIME] ---------------

Just checked my notes I have tried this after tons of research this does work..

but it fills your apache error log file up with this error..

Code:

PHP Parse error:  syntax error, unexpected T_STRING, expecting ',' or ';' in /home/public_html/forum/holdsession.php on line 37, referer: arcade.php?&act=Arcade&do=play&gameid=4972
thanks for your effort

Mark.B 08-30-2011 08:59 PM

Quote:

Originally Posted by Hippy (Post 2240148)
thanks Mark I will test it out ..

as mine has always been ticked by default as well.. but I am looking to improve it for others..
Peek in this forum, I been helping out for some time, I was determined to keep this mod alive..
I will report back..


thanks
Hippy

--------------- Added [DATE]1314741199[/DATE] at [TIME]1314741199[/TIME] ---------------

Just checked my notes I have tried this after tons of research this does work..

but it fills your apache error log file up with this error..

Code:

PHP Parse error:  syntax error, unexpected T_STRING, expecting ',' or ';' in /home/public_html/forum/holdsession.php on line 37, referer: arcade.php?&act=Arcade&do=play&gameid=4972
thanks for your effort

Hmm I had a feeling that might happen because actually the syntax is still wrong...it's going to get confused with the ' marks.

But it seems to work...whereas correcting the syntax like this:
Code:

echo "<meta http-equiv='refresh' content='$secs; URL=$vboptions[bburl]/holdsession.php$session[sessionurl_q]act=arcade&do=play&gameid=$gameid'>";
fails!

--------------- Added [DATE]1314741892[/DATE] at [TIME]1314741892[/TIME] ---------------

Well I reversed the syntax as well to this:
Code:

echo '<meta http-equiv="refresh" content="$secs; URL=$vboptions[bburl]/holdsession.php$session[sessionurl_q]act=arcade&do=play&gameid=$gameid">';
And it still fails.

Syntactically (is that a real word?) it's correct so I can't fathom what's making it fail.

Hippy 08-30-2011 09:53 PM

I pulled my hair out on this pal..
I read and got it working and I was happy !
till 500 email came with this apache error

LoL I don't know if it's a real word or not lol (sounds good to me tho ;))I'm not an expert so I read and came up with what you posted and it worked but like I said those errors where killing me ..

MrZeropage 08-31-2011 05:46 AM

I started the v2.7.2+ development and will implement all fixes that have been found, will also check the holdsession.php

First need to install fresh vB4 on my site, this is my task for the weekend :)

Eric 08-31-2011 07:17 AM

Shouldn't it be:

PHP Code:

echo '<meta http-equiv=\'refresh\' content=\'' $secs '; URL=' $vbulletin->options['bburl'] . '/holdsession.php' $vbulletin->session->vars['sessionurl_q'] . 'act=arcade&do=play&gameid=' $gameid '\'>'

That should work.

waylandprod 08-31-2011 03:24 PM

I had one of my more tech-savvy users look at it, and he fixed it by changing the php in 'holdsession.php' from
PHP Code:

echo "<meta http-equiv=\"refresh\" content=\"$secs; URL=\"$vboptions[bburl]/holdsession.php$session[sessionurl_q]act=arcade&do=play&gameid=$gameid\">"

to
PHP Code:

echo '<meta http-equiv=\'refresh\' content=\'' $secs '; URL=' $vbulletin->options['bburl'] . '/holdsession.php' $vbulletin->session->vars['sessionurl_q'] . 'act=arcade&do=play&gameid=' $gameid '\'>'

AND changing
PHP Code:

$session['sessionurl_q'] = "?$session[sessionurl]"

to
PHP Code:

$session['sessionurl_q'] = '?'.vbulletin->session->vars['sessionurl_q']; 


Hippy 08-31-2011 06:46 PM

Quote:

Originally Posted by Eric (Post 2240335)
Shouldn't it be:

PHP Code:

echo '<meta http-equiv=\'refresh\' content=\'' $secs '; URL=' $vbulletin->options['bburl'] . '/holdsession.php' $vbulletin->session->vars['sessionurl_q'] . 'act=arcade&do=play&gameid=' $gameid '\'>'

That should work.

Quote:

Originally Posted by waylandprod (Post 2240456)
I had one of my more tech-savvy users look at it, and he fixed it by changing the php in 'holdsession.php' from
PHP Code:

echo "<meta http-equiv=\"refresh\" content=\"$secs; URL=\"$vboptions[bburl]/holdsession.php$session[sessionurl_q]act=arcade&do=play&gameid=$gameid\">"

to
PHP Code:

echo '<meta http-equiv=\'refresh\' content=\'' $secs '; URL=' $vbulletin->options['bburl'] . '/holdsession.php' $vbulletin->session->vars['sessionurl_q'] . 'act=arcade&do=play&gameid=' $gameid '\'>'

AND changing
PHP Code:

$session['sessionurl_q'] = "?$session[sessionurl]"

to
PHP Code:

$session['sessionurl_q'] = '?'.vbulletin->session->vars['sessionurl_q']; 


thanks for your efforts guys..

that change does hold the session but
now this is the error in the apache error log

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /forum/holdsession.php on line 19,
witch is this line now
PHP Code:

$session['sessionurl_q'] = '?'.vbulletin->session->vars['sessionurl_q']; 


Mark.B 08-31-2011 06:58 PM

Quote:

Originally Posted by Hippy (Post 2240547)
thanks for your efforts guys..

that change does hold the session but
now this is the error in the apache error log

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /forum/holdsession.php on line 19,
witch is this line now
PHP Code:

$session['sessionurl_q'] = '?'.vbulletin->session->vars['sessionurl_q']; 


Surely that should be:
PHP Code:

$session['sessionurl_q'] = '?' $vbulletin->session->vars['sessionurl_q']; 

Also I'm certain the echo should be:
PHP Code:

echo '<meta http-equiv=\'refresh\' content=\'' $secs '; URL=' $vbulletin->options['bburl'] . '/holdsession.php' $session['sessionurl_q'] . '\''

Otherwise why set $session['sessionurl_q] and append the "?" in the first place?

Driving me bonkers this!

Hippy 08-31-2011 07:46 PM

Same apache error :(
this has become a problem since I believe 4.0.8
I have no idea what changed but

thanks for keeping up with this issue

Mark.B 08-31-2011 07:54 PM

Quote:

Originally Posted by Hippy (Post 2240587)
Same apache error :(
this has become a problem since I believe 4.0.8
I have no idea what changed but

thanks for keeping up with this issue

Remembering the php college course I did a few years back now, where they set us very similar "problems" to this to solve at home, I am convinced we still have an issue with the ' marks everywhere, and which should be escaped and which not.

I *think* we have the echo line correct now but there is probably still an issue with this:
PHP Code:

$session['sessionurl_q'] = '?' $vbulletin->session->vars['sessionurl_q']; 


Eric 08-31-2011 08:00 PM

1 Attachment(s)
Try the attached file.

Hippy 08-31-2011 08:34 PM

Quote:

Originally Posted by Eric (Post 2240597)
Try the attached file.

no errors in the log but you get logged out of the board..
thanks for your effort

This is getting to me like it did last time..

I am sure it now boggling everyone in the thread

--------------- Added [DATE]1314827030[/DATE] at [TIME]1314827030[/TIME] ---------------

for shits and giggles I uploaded a blank holdsession.php

no errors in the apache logs.. and you don't get logged out ... w t f

I don't get this

But f it's a long game I'm not sure if you would be logged out ..
I only test on a short game I don't have the time to sit ATM and play a longer game..

or if it's like this maybe someone would be able to cheat ..

I'm so confused..
maybe all the code you guys posted is good maybe it's how the arcade.php is handling it ??


All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01164 seconds
  • Memory Usage 1,797KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (15)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete