0

I have this problem for days now... I just do a fresh install on syfmony but after i create a bundle from symfony console i get this error from the webpage...

ContextErrorException: Warning: is_dir(): open_basedir restriction in effect. 
File(/srv/www/backend.tacon.eu/web) is not within the allowed path(s): (/var/www/clients/client1/web5/web:/var/www/clients/client1/web5/private:/var/www/clients/client1/web5/tmp:/var/www/backend.tacon.eu/web:/srv/www/backend.tacon.eu/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web5/web/back/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php line 59

I don't know why is this happening. This is not my first symfony project and this never happens. Also on the same server i have various symfony projects.

Thanks in advance

1
  • 1
    Related Commented Jul 28, 2014 at 12:14

3 Answers 3

2

I had the same problem after refresh install symfony using composer. I have solved this issue by editing php configuration file (php.ini).

Set the open_basedir option to null.

More about open_basedir

Sign up to request clarification or add additional context in comments.

Comments

1

From ISPConfig: WebSites-> Your Site -> Options -> PHP open_basedir -> Add :/srv/www/backend.tacon.eu/web at the end of line

Comments

0

if you face this error on live server then you can solve this problem like this-

<?php
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';

use Symfony\Component\HttpFoundation\Request;

$kernel = new AppKernel('prod', true);
$kernel->loadClassCache();
// wrap the default AppKernel with the AppCache one

$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

in line $kernel = new AppKernel('prod', true); you may change it "prod" or "dev" and it's value like true or false;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.