Failed Opening required no cakephp

Asked

Viewed 18 times

0

I’m implementing a plugin in my cakephp project, but when I request a file that’s in the folder 'webroot/blog/file', he shows me the following message:

Error: require() [http://php.net/function.require'>Function.require]: Failed Opening required '/blog/wp-load.php' (include_path='/var/www/intercambioglobal.com.br/lib:.: /usr/share/Pear:/usr/share/php')

  • You are trying to put a wordpress plugin?

  • That’s right, it’s a wp plugin that pulls recent posts.

  • It will not work as it will fetch the wordpress dependencies

  • So, will I have to build a custom plugin without using the wordpress dependencies? Ex: I have the wp_posts table, so I’ll make a plugin that works on top of it?

  • 1

    That, you can connect in the wordpress database (if it is different bank than your cake application) and make queries.

  • Just to have the concept, why this? Because this application works normally if you are not using mvc?

  • 1

    It is not because of the MVC, but rather by the folder structure, the wordpress plugin is searching from the root the file wp-load.php and will probably give several errors regarding other dependencies

  • Got it, thank you very much.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.