Integrate WP into existing CMS – Conflicts!
I try to integrate a running wordpress installation into my CMS. I started with simply inserting
require('...path.../wp-blog-header.php')into my CMS at the position I want the blog to be displayed.
However, I get the following error:
Fatal error: Call to undefined method stdClass::set_prefix() in D:\...my path...\wordpress\wp-settings.php on line 268
Somehow wordpress is unable to load the database properly (
set_prefix()is a method of the wpdb class). Since my CMS uses some ‘magic’ methods of PHP like
__autoload()etc, I suspect this to be the reason for the error. But I couldnt find any methods in WP that are also used by my CMS.
What I found out so far:
The $wpdb object isn’t initialized at all. When I call
var_dump($wpdb)in wp-settings.php it says “NULL”. However at the bottom of wp-db.php it is set up properly (var_dump shows the content of the object).
I found on google someone that has a similar problem using cakePHP + WP. But what methods (that are apparently used by cakePHP and my CMS) cause the conflict?
Thanks for your help!
- The topic ‘Integrate WP into existing CMS – Conflicts!’ is closed to new replies.