From dcdc597787341e5b3930a131b08d48879f862b5c Mon Sep 17 00:00:00 2001 From: Yves ASTIER Date: Sun, 7 Sep 2014 23:52:26 +0200 Subject: [PATCH] #39 issue : documentation : avoid problem with some Wordpress plugin --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b7c302..3e29239 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,33 @@ security: entity: { class: Ekino\WordpressBundle\Entity\User, property: login } ``` -### 3) Update your Wordpress index.php file to load Symfony libraries +### 3) Wrap code inside web/app.php and web/app_dev.php + +To avoid problem with some Wordpress plugin, you need to wrap code inside a function like this : +```php +loadClassCache(); + Request::enableHttpMethodParameterOverride(); + $request = Request::createFromGlobals(); + $response = $kernel->handle($request); + $response->send(); + $kernel->terminate($request, $response); +} +run(); +``` + +And now do the same for app.php + +### 4) Update your Wordpress index.php file to load Symfony libraries ```php send(); $sfKernel->terminate($sfRequest, $sfResponse); ``` -### 4) Edit .htaccess file on your Wordpress root project directory +### 5) Edit .htaccess file on your Wordpress root project directory Put the following rules: