PDA

View Full Version : Fatal error: Call to a member function query_first_slave()


dolbex
12-15-2008, 08:28 PM
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:

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?

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:


$dir = getcwd();
chdir('./forums');
require './global.php';
chdir($dir);


But, I got the above error message as

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