Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2016, 02:29 AM
DaSpamer DaSpamer is offline
 
Join Date: Apr 2013
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Cant setup external login

Hello, I'm trying to set up external login but getting fatal errors that I can't seem to fix.

My script is
PHP Code:
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
define("VB_PATH",realpath(dirname(__FILE__)));
// Start login script
define('CSRF_PROTECTION'false);
require_once(
VB_PATH '/includes/vb5/autoloader.php');
vB5_Autoloader::register(VB_PATH);
vB5_Frontend_Application::init('config.php');
$api Api_InterfaceAbstract::instance(); 
The error I'm getting is
Code:
Fatal error: Class 'vB_Request_WebApi' not found in /home/USER/public_html/_vb5/includes/api/interface/collapsed.php on line 38

Fatal error: Class 'vB_Shutdown' not found in /home/USER/public_html/_vb5/core/vb/vb.php on line 502
Couldn't find anything related to my issue anywhere on the internet, hope someone could help me out.
Reply With Quote
  #2  
Old 09-01-2016, 05:47 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you upload all the files from the package? Based from the error message, it looks like /home/USER/public_html/_vb5/core/vb/request/webapi.php and /home/USER/public_html/_vb5/core/vb/shutdown.php are missing.
Reply With Quote
  #3  
Old 09-02-2016, 01:30 PM
DaSpamer DaSpamer is offline
 
Join Date: Apr 2013
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I did upload all files, I'm using vb5.2.3, didn't modify anything, uploaded from a fresh download.
Both files exist, both classes are inside those files, but it seems that somewhat they're not being used, and I have no idea what's the problem, reuploading doesnt seem solve it.
Reply With Quote
  #4  
Old 09-03-2016, 12:59 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is that external script located? Could you do var_dump(VB_PATH)?
Reply With Quote
  #5  
Old 09-03-2016, 03:13 PM
DaSpamer DaSpamer is offline
 
Join Date: Apr 2013
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the extrenal script is located at the base dir same dir where core.
var dump output is
Code:
string(31) "/home/user/public_html/_vb5"
which is the forum base.

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

Issue was that I defined VB_PATH and is messed up something inside.
wish they had documentary so I could actually know what I can and cannot do.
Reply With Quote
  #6  
Old 09-03-2016, 04:51 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you got it?

I use this code if the external login code is inside the forum directory.

Code:
<?php
define('CSRF_PROTECTION', false);
require_once(__DIR__ . '/includes/vb5/autoloader.php');
vB5_Autoloader::register(__DIR__);
vB5_Frontend_Application::init('config.php');
echo $vbulletin->userinfo['username'];
Reply With Quote
Благодарность от:
MarkFL
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03961 seconds
  • Memory Usage 2,217KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete