vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom page login issue (https://vborg.vbsupport.ru/showthread.php?t=315802)

Alvar 12-03-2014 06:40 PM

Custom page login issue
 
Ive created custom page that has login...
when I login it loads and when the loading is done, it still shows logged out, exept if I go to vBulletin page that is not custom made, then I'm logged in... when ever I go to my custom page then I'm back to logged out, but actually I'm logged in but showing logged out...

My custom page is outaide vBulletin installation folder called "forum"

Lynne 12-03-2014 06:59 PM

If it's outside the /forum directory, then you probably need to move a bunch of required files to outside the /forum directory also. You should use a browser webmaster tool to see which files aren't being called by your script (assuming you used the tutorial in the vB4 Articles section to create the custom page).

nerbert 12-03-2014 07:34 PM

I can never get it straight how error messages are controlled so in every project I build I put this at the top
Code:

ini_set('display_errors', 1);
If some file isn't available you'll get a "failed to open stream" error message. I assume you have somehow required global.php. It in turn requires several other files. Maybe global can't get the right path or something.

Then after your required files I would put in

Code:

echo 'userid = ' . $vbulletin->userinfo['userid'];
That way you can see if it knows who you are.

Alvar 12-04-2014 02:23 PM

:eek: Ok, now I'm stuck there...
Code:

userid = Unable to add cookies, header already sent.
File: /home/domain/public_html/index.php
Line: 3


nerbert 12-04-2014 02:48 PM

Well, my echo line isn't working. I think it doesn't know your userid.

Try a plugin in "load_show_variables", and put that echo line in there and comment it out in your custom file.

Try it just once and then turn off the plugin or it will echo that on every page. It should take just a few seconds

Alvar 12-04-2014 03:29 PM

I see header, navbar... everything, but still shows me as "not logged in" :) but actually I'm logged it.

nerbert 12-04-2014 03:39 PM

If you don't see "userid = " above the regular page styling I suspect includes/class_bootstrap.php did not open a stream.

Does it show on other pages? If so turn off that plugin so it doesn't interfer with other pages

Alvar 12-04-2014 03:44 PM

on my custom page it says:
userid = 0

in normal vB4 pages userid = 1

nerbert 12-04-2014 03:47 PM

OK, that means it thinks you are a guest. So apparently it isn't reading your cookies. I'm not sure where it's supposed to do that but I'll have a look

Alvar 12-04-2014 03:52 PM

oky, thx, will wait


All times are GMT. The time now is 01:47 PM.

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.01533 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete