vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Fatal error: Call to a member function query_first_slave() (https://vborg.vbsupport.ru/showthread.php?t=198953)

dolbex 12-15-2008 08:28 PM

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.

dolbex 12-17-2008 12:21 PM

No help here? I'm sure someone has run across this attempting to run Datamanager from outside vB.

Lynne 12-17-2008 02:14 PM

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

PHP Code:

global $vbulletin


Marco van Herwaarden 12-19-2008 12:43 PM

It would be much easier to help you if you posted snippets of your code.

sanjeev_jha 04-24-2009 10:57 AM

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

Andreas 04-25-2009 08:43 AM

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).

sanjeev_jha 04-26-2009 04:25 AM

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

zolthan 05-04-2009 10:12 AM

Quote:

Originally Posted by Andreas (Post 1798634)
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.


All times are GMT. The time now is 05: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.00977 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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