Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-15-2008, 08:28 PM
dolbex dolbex is offline
 
Join Date: Aug 2005
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Fatal error: Call to a member function query_first_slave()

Howdy,

I'm having a really tough time executing some datamanager code from within the CakePHP framework. I won't bore you with the details and I know this isn't a CakePHP forum. However, I would like to understand why I'm getting the error:

Quote:
Fatal error: Call to a member function query_first_slave()
I get this whenever I try to execute my code from within cake and it happens after I change directories and require the global.php file. The error is on line 1319 in global and is a query that vB is executing.

ANY help would be very very appreciated. It seems that integrating vB with cake is something nobody has a great answer for and I would love to release a true solution for everyone.

Thanks!

I should note that if I execute the file outside of the framework it works just fine. It is certainly a problem between vB and cake.
Reply With Quote
  #2  
Old 12-17-2008, 12:21 PM
dolbex dolbex is offline
 
Join Date: Aug 2005
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No help here? I'm sure someone has run across this attempting to run Datamanager from outside vB.
Reply With Quote
  #3  
Old 12-17-2008, 02:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You didn't write out the query line, but perhaps $vbulletin wasn't defined as global?

PHP Code:
global $vbulletin
Reply With Quote
  #4  
Old 12-19-2008, 12:43 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be much easier to help you if you posted snippets of your code.
Reply With Quote
  #5  
Old 04-24-2009, 10:57 AM
sanjeev_jha sanjeev_jha is offline
 
Join Date: Apr 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am also having similar problem while trying to integrate vb with CakePHp.

In cakephp app_controller.php in beforeFilter function, I have written the following to instantiate vbulletin:

Code:
$dir = getcwd(); 
chdir('./forums');
require './global.php';
chdir($dir);
But, I got the above error message as

Quote:
Call to a member function query_first_slave()
Hope I will get solutions to my problem.

Thanks.
Sanjeev
Reply With Quote
  #6  
Old 04-25-2009, 08:43 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I assume you are including global.php in a non-global context (eg. within a function or class method) - this won't work (that easily).
Reply With Quote
  #7  
Old 04-26-2009, 04:25 AM
sanjeev_jha sanjeev_jha is offline
 
Join Date: Apr 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Andreas.

Do you have experience in integrating vBulletin with Cakephp application? If so, can you give me hints on integration.

Also, I am using ajax based login. Is it possible to authenticate users in vBulletin using AJAX form?

Thanks
Reply With Quote
  #8  
Old 05-04-2009, 10:12 AM
zolthan zolthan is offline
 
Join Date: Apr 2009
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andreas View Post
I assume you are including global.php in a non-global context (eg. within a function or class method) - this won't work (that easily).
Do you have a possibility to make this working? I have to initialise the Forum from a non-global context (from within a class) :-(

Please help, it's rather urgent... I try to create a Magento-vBulletin-SingleSignOn-Plugin.
Reply With Quote
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 09:44 AM.


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.04051 seconds
  • Memory Usage 2,229KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete