title: Symfony2 open_basedir restriction in effect
body: <p>i'm trying to deploy a symfony 2.7 project to shared hosting. Everything works fine on localhost but on the server i got big fat error...</p>
  
  <p>When i try to hit the site:</p>
  
  <p><a href="http://infinityproperty.sitetester.biz/" rel="nofollow">http://infinityproperty.sitetester.biz/</a></p>
  
  <p>I was getting a error :</p>
  
  <p>Warning: is_dir(): open_basedir restriction in effect. File(/srv/www/infinityproperty.sitetester.biz/web) is not within the allowed path(s): </p>
  
  <p>When I try to enter 3-4 times it removes the error and i can see the structure. But the issue is there. Also no images from the liipimage are shown.</p>
  
  <p>I have remove the check for the locale and the error can be seen :</p>
  
  <p><a href="http://infinityproperty.sitetester.biz/app_dev.php" rel="nofollow">http://infinityproperty.sitetester.biz/app_dev.php</a></p>
  
  <p>I know that it is very dangerous  and i will completely remove it after resolving my issue.</p>
  
  <p>The app, bin, and so on are one directory up in a private folder.</p>
  
  <p>Here is the basic config:</p>
  
  <pre><code>imports:
      - { resource: parameters.yml }
      - { resource: security.yml }
      - { resource: services.yml }
  
  # Put parameters here that don't need to change on each machine where the app is deployed
  # http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  parameters:
      locale: bg
      kernelRootDir: %kernel.root_dir%
      web: "/../../web"
  framework:
      #esi:             ~
      translator:      { fallbacks: ["%locale%"] }
      secret:          "%secret%"
      router:
          resource: "%kernel.root_dir%/config/routing.yml"
          strict_requirements: ~
      form:            ~
      csrf_protection: ~
      validation:      { enable_annotations: true }
      #serializer:      { enable_annotations: true }
      templating:
          engines: ['twig']
          #assets_version: SomeVersionScheme
      default_locale:  "%locale%"
      trusted_hosts:   ~
      trusted_proxies: ~
      session:
          # handler_id set to null will use default session handler from php.ini
          handler_id:  ~
      fragments:       ~
      http_method_override: true
  
  # Twig Configuration
  twig:
      debug:            "%kernel.debug%"
      strict_variables: "%kernel.debug%"
      globals:
          kernelRootDir: %kernel.root_dir%
      form_themes:
          # other form themes
          - 'CoreBundle:VichForm:fields.html.twig'
  # Assetic Configuration
  assetic:
      debug:          "%kernel.debug%"
      use_controller: false
      bundles:        [CoreBundle,FOSUserBundle,PagesBundle]
      #java: /usr/bin/java
      filters:
          cssrewrite: ~
          #closure:
          #    jar: "%kernel.root_dir%/Resources/java/compiler.jar"
          #yui_css:
          #    jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
  
  # Doctrine Configuration
  doctrine:
      dbal:
          driver:   pdo_mysql
          host:     "%database_host%"
          port:     "%database_port%"
          dbname:   "%database_name%"
          user:     "%database_user%"
          password: "%database_password%"
          charset:  UTF8
          # if using pdo_sqlite as your database driver:
          #   1. add the path in parameters.yml
          #     e.g. database_path: "%kernel.root_dir%/data/data.db3"
          #   2. Uncomment database_path in parameters.yml.dist
          #   3. Uncomment next line:
          #     path:     "%database_path%"
  
      orm:
          auto_generate_proxy_classes: "%kernel.debug%"
          naming_strategy: doctrine.orm.naming_strategy.underscore
          auto_mapping: true
  
  # Swiftmailer Configuration
  swiftmailer:
      transport: "%mailer_transport%"
      host:      "%mailer_host%"
      username:  "%mailer_user%"
      password:  "%mailer_password%"
      spool:     { type: memory }
  fos_user:
      db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
      firewall_name: main
      user_class: George\UserBundle\Entity\User
  simple_things_entity_audit:
      audited_entities:
          - George\PageBundle\Entity\Page
          - George\UserBundle\Entity\User
  stof_doctrine_extensions:
      orm:
          default:
              sluggable: true
              sortable: true
              timestampable: true
  vich_uploader:
      db_driver: orm
      mappings:
          product_image:
              uri_prefix:         /images/products
              upload_destination: %kernel.root_dir%/../../web/images/products
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          apartment_image:
              uri_prefix:         /images/apartment
              upload_destination: %kernel.root_dir%/../../web/images/apartment
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          slide_image:
              uri_prefix:         /images/slider
              upload_destination: %kernel.root_dir%/../../web/images/slider
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          point_image:
              uri_prefix:         /images/point
              upload_destination: %kernel.root_dir%/../../web/images/point
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          object_image:
              uri_prefix:         /images/object
              upload_destination: %kernel.root_dir%/../../web/images/object
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          gallery_image:
              uri_prefix:         /images/gallery
              upload_destination: %kernel.root_dir%/../../web/images/gallery
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
          company_image:
              uri_prefix:         /images/company
              upload_destination: %kernel.root_dir%/../../web/images/company
              inject_on_load:     false
              delete_on_update:   true
              delete_on_remove:   true
  liip_imagine:
      resolvers:
         default:
            web_path: ~
  
      filter_sets:
          cache: ~
          my_thumb:
              quality: 75
              filters:
                  thumbnail: { size: [120, 90], mode: outbound }
          720x534:
              quality: 75
              filters:
                  thumbnail: { size: [720,534],  mode: outbound }
          1920x1440:
              quality: 75
              filters:
                  thumbnail: { size: [1920,1440],  mode: outbound }
  oneup_uploader:
      mappings:
          gallery:
              frontend: fineuploader # or any uploader you use in the frontend
              allowed_mimetypes: [image/jpeg,image/png,image/gif]
              namer:  oneup_uploader.namer.uniqid
  
  a2lix_translation_form:
      locale_provider: default       # [1]
      locales: [bg, en]          # [1-a]
      default_locale: bg             # [1-b]
      required_locales: [bg]         # [1-c]
      manager_registry: doctrine      # [2]
      templating: "A2lixTranslationFormBundle::default.html.twig"      # [3]
  swiftmailer:
      transport: '%mailer_transport%'
      host:      '%mailer_host%'
      username:  '%mailer_user%'
      password:  '%mailer_password%'
  stfalcon_tinymce:
          tinymce_jquery: true
          selector: ".tinymce"
          # Get current language from the parameters.ini
          language: %locale%
          # Custom buttons
          tinymce_buttons:
              stfalcon: # Id of the first button
                  title: "Stfalcon"
                  image: "http://stfalcon.com/favicon.ico"
          theme:
              # Simple theme: same as default theme
              simple: ~
              # Advanced theme with almost all enabled plugins
              advanced:
                   plugins:
                       - "advlist autolink lists link image charmap print preview hr anchor pagebreak"
                       - "searchreplace wordcount visualblocks visualchars code fullscreen"
                       - "insertdatetime media nonbreaking save table contextmenu directionality"
                       - "emoticons template paste textcolor"
                   toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
                   toolbar2: "print preview media | forecolor backcolor emoticons | stfalcon | example"
                   image_advtab: true
                   templates:
                       - {title: 'Three columns', content: '&lt;div class="firstColumn"&gt;aaaaaa&lt;/div&gt;&lt;div class="secondColumn"&gt;aaaaaa&lt;/div&gt;&lt;div class="thirdColumn"&gt;ccccc&lt;/div&gt;'}
                       - {title: 'checklist', content: '&lt;ul&gt;&lt;li&gt;Chek 1&lt;/li&gt;&lt;li&gt;Chek 1&lt;/li&gt;&lt;/ul&gt;'}
              # BBCode tag compatible theme (see http://www.bbcode.org/reference.php)
              bbcode:
                   plugins: ["bbcode, code, link, preview"]
                   menubar: false
                   toolbar1: "bold,italic,underline,undo,redo,link,unlink,removeformat,cleanup,code,preview"
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>It was not the open_basedir the problem... It was the first deployment of the project so it has some problems with the paths... So the solution was to clear all the cache and make all directories with the proper permissions also the config file was needed to be twig a bit basically where should stay the core symfony.</p>