title: Integrating wordpress with cakephp
body: <p>I have a website running with CakePHP. Now I need to include a Wordpress blog to run along with it. The issue is that I need to make some integration, like user logins, so I'm trying to include the Wordpress file that's supposed to give that integration.</p>
  
  <p>My server's file system structure is:</p>
  
  <pre><code>/root
      /app (cake's app directory)
          /webroot
          /...
      /blog (wordpress directory)
          /wp-admin
          /...
  </code></pre>
  
  <p>The installation for Wordpress went fine (I'm using a subdomain that points to this folder), so now I have both sites running perfectly by themselves.</p>
  
  <p>However, as I mentioned above, I need to create some integration with them, specifically log in users in the Wordpress site when they log into my CakePHP site. I've tried doing what <a href="https://stackoverflow.com/questions/7307722/access-wordpress-session-from-cake-php-site">this other question says</a>, but I get the following error:</p>
  
  <pre><code>Fatal error: Cannot redeclare __() (previously declared in /homepages/36/d******/htdocs/cake/basics.php:657) in /homepages/36/d********/htdocs/app/controllers/users_controller.php on line 60 
  </code></pre>
  
  <p>I'm trying to place the code that should bring Wordpress' functions into CakePHP (<strong>require('../../blog/wp-blog-header.php');</strong>) in the <strong>users_controller</strong>, but I'm not even sure that's the right place to do that.</p>
  
  <p>I've read somewhere else that sometimes different frameworks declare functions with the same name and that can cause conflict.</p>
  
  <p>So I'm not sure if that's the case or I'm just placing the "integration code" in the wrong place.</p>
  
  <p>Any help would be much appreciated!</p>