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?
– Jeferson Assis
That’s right, it’s a wp plugin that pulls recent posts.
– Michel Henriq
It will not work as it will fetch the wordpress dependencies
– Jeferson Assis
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?
– Michel Henriq
That, you can connect in the wordpress database (if it is different bank than your cake application) and make queries.
– Jeferson Assis
Just to have the concept, why this? Because this application works normally if you are not using mvc?
– Michel Henriq
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– Jeferson Assis
Got it, thank you very much.
– Michel Henriq