views:

120

answers:

2

Alright, I have a wordpress site, that I want to have a clientportal built with codeigniter in it. For the sake of continued theme, I would like to have the codeigniter program where the page/text would normally be.

Here is the site http://foretruss.com/wordpress/?page%5Fid=8 you can see the error I get when I have php_exec plugin installed and use the snippet.

Any Idea's/help/word of advice?

+2  A: 

It's a bad idea to mix and match frameworks like Wordpress and CodeIgniter. There are bound to be collisions of variables and constants; not to mention the substantial increase in resources required to load the page.

If you REALLY need to do this, though, you can try loading your CI setup into a separate directory from your WP setup and use AHAH or an iframe to pull everything over. Granted, you won't get the SEO benefits, but at the same time it's probably the "best" way to go.

For the record, the error that you're getting from CI is a header error. Basically, it's trying to put something in your cookies or write to the HTTP request headers, except they've already been signed, sealed, and delivered (hence the error). Perhaps if you turn off sessions in CI, you'll have better luck. The alternative is to load up the index.php file for WP and put a big

ob_start();

right at the beginning.

mattbasta
+1  A: 

See another post on combining CI and WP: Getting posts from Wordpress to out of WP in codeigniter view

Bruce Alderson