Hio,
So I have a website which uses the Zend Framework as MVC (www.site.com), and a separate blog set up in wordpress (www.site.com/blog) on the same server, but I want to be able to use Wordpress functions on various pages to pull posts from wordpress.
Currently, the webservers DocumentRoot is /httpdocs/public. public contains a symlink to /httpdocs/blog (I have Options FollowSymlinks on)
All requests are routed through htaccess rules which either redirects it to httpdocs/public/index.php (which then loads Zend stuff) or a regular file/other area not inside the Zend application.
The example code in wordpress is to use the following:
define('WP_USE_THEMES', false);
require(APPLICATION_PATH .'/../blog/wp-blog-header.php');
But... this just tries to redirect me from site.com/page to site.com/page/wp-admin/install.php (which doesn't exist, and so I get a 'this page is redirecting in a way that will never complete' error from firefox, even though site.com/blog is setup and works perfectly fine. For some reason it doesn't seem to recognise that it is (probably because of path issues...)
Does anyone know how I could fix this??
Note: at the moment I just query the wordpress database, but this doesn't work properly because its not formatting the post content properly.
APPLICATION_PATHcontain? When is the redirect taking place exactly? Including the header file should never trigger a redirect as far as I know.wp-config.phpand loaded it from your bootstrap? If not, WordPress will likely not find your db and try to create one.APPLICATION_PATHis the root path to my website i.e./var/www/vhosts/.../httpdocs/public/. I can file_get_contents that file as well, so that's fine there (and the paths inside WP are fine when I echo them)... It triggers a header redirect somewhere when it thinks there's no installation I believe?? The redirect takes place just when I load the page. It doesn't actually work, because it SHOULD be site.com/blog/wp-admin/install.php INSTEAD OF site.com/page/wp-admin/install.php ... it's weird!wp-config.phpinside/httpdocs/blog. I'll tryrequire_once(APPLICATION_PATH . '/../blog/wp-config.php');? I'll give that a try.. NOPE! Didn't work haha,The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.Note that now it doesn't redirect to /wp-admin/install.php though...