2

I'm trying to setup a Symfony installation for the first time on my Ubuntu server with ISPConfig to do some testing. But without any luck until now.

First I encountered a error:

PHP Fatal error:  Cannot redeclare class Symfony\Component\Debug\Exception\FlattenException in .../vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php on line 25. 

I found out that it was caused by a problem in the latest Symfony composer installation (not sure what exactly caused it). I resolved it by downloading the Symfony library trough Github and overwriting the one that was installed by composer. Both version 2.6.

But now I get the following error:

ContextErrorException in ExecutableFinder.php line 59:
Warning: is_dir(): open_basedir restriction in effect. 
File(/srv/www/symfony.mysite.nl/symfony) is not within the allowed path(s): 
(/var/www/clients/client1/web6/symfony:/var/www/clients/client1/web6/private:/var/www/clients/client1/web6/tmp:/var/www/symfony.mysite.nl/symfony:/srv/www/symfony.mysite.nl/symfony:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin)

In my search for a solution I found ContextErrorException after generating a bundle in Symfony but the answers don't work for me. The path /srv/www/symfony.mysite.nl/symfony is already in the ISPConfig setup of my site at WebSites-> Your Site -> Options -> PHP open_basedir. And even setting "open_basedir = null" in WebSites-> Your Site -> Options -> Custom php.ini settings wil do nothing (I think that it isn't a good idea btw to disable it but I tried).

I tried to install older versions of Symfony but I had the same problems.

7
  • Comment out the open basedir in php.ini. "null" is not available in configs and is parsed as a string.
    – Daniel W.
    Jan 19, 2015 at 13:27
  • In the used php.ini file I can find only one mentioning of the open_basedir: open_basedir = null. This is what I put in config of ISPConfig.
    – M4RT13N
    Jan 21, 2015 at 16:12
  • PHP info shows the following list strangely enough: /var/www/clients/client1/web6/symfony:/var/www/clients/client1/web6/private:/var/www/clients/client1/web6/tmp:/var/www/symfony.mysite.nl/symfony:/srv/www/symfony.mysite.nl/symfony:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
    – M4RT13N
    Jan 21, 2015 at 16:21
  • Then you are loading a different php.ini configuration
    – Daniel W.
    Jan 21, 2015 at 16:22
  • How can I find out if that's true? Php info states: Loaded Configuration File /var/www/conf/web6_symfony/php.ini
    – M4RT13N
    Jan 21, 2015 at 16:27

1 Answer 1

0

You are using the config wrong, NULL is not ment to be literally written, use empty value or comment out the whole line using ;.

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/open-basedir
;open_basedir =
1
  • 1
    I tried to use the empty one without any effect. I can't try to comment it out because I can't find the open_basedir to begin with. I still think the error is strange because the path / file it complains about is in the list of allowed paths.
    – M4RT13N
    Jan 22, 2015 at 10:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.