title: Symfony 1.4: Error Clearing Cache in Maintenance Mode
body: <p>I'm working with a legacy Symfony 1.4 site, and upgrading at this time is not an option.</p>
  <p>In order to deploy the site, I've created a task that first puts the site into maintenance mode, does some other work (pull down code, etc.), then clears the cache, before attempting to put the site back online (out of maintenance mode).</p>
  <p>However, I find when I try to clear the cache in maintenance mode, it fails and I instead get the web-page back on the command line.   Any suggestions on resolving this?</p>
  <pre><code>[geoff.maddock@corp09 smc]$ sudo ./symfony project:disable prod koba frontend2 api api2
  [sudo] password for geoff.maddock:
  &gt;&gt; file+     /var/www/smc/data/koba_prod.lck
  &gt;&gt; enable    koba [prod] has been DISABLED
  &gt;&gt; file+     /var/www/smc/data/frontend2_prod.lck
  &gt;&gt; enable    frontend2 [prod] has been DISABLED
  &gt;&gt; file+     /var/www/smc/data/api_prod.lck
  &gt;&gt; enable    api [prod] has been DISABLED
  &gt;&gt; file+     /var/www/smc/data/api2_prod.lck
  &gt;&gt; enable    api2 [prod] has been DISABLED
  
  
  [geoff.maddock@corp09 smc]$ sudo ./symfony cc
  &gt;&gt; cache     Clearing cache type &quot;all&quot; for &quot;backend&quot; app and &quot;prod&quot; env
  &gt;&gt; file+     /var/www/smc/data/backend_prod-cli.lck
  &gt;&gt; chmod 777 /var/www/smc/data/backend_prod-cli.lck
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_sfGuardAuth_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_core_compile.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_circuit_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_virtualCenter_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_home_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_factories.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_databases.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_circuit_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_routing.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_virtualCenter_config_view.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_app.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_change_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_virtualCenter_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_customer_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_home_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_change_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_settings.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_customer_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_circuit_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_ticket_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_sfGuardAuth_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_customer_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_change_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_ticket_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_virtualCenter_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_sfGuardAuth_config_view.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_home_config_security.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_config_handlers.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_ticket_config_module.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/config_autoload.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_home_config_view.yml.php
  &gt;&gt; file-     /var/www/smc/cache/backend/prod/config/modules_sfGuardAuth_config_filters.yml.php
  &gt;&gt; file-     /var/www/smc/data/backend_prod-cli.lck
  &gt;&gt; cache     Clearing cache type &quot;all&quot; for &quot;frontend2&quot; app and &quot;prod&quot; env
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
  &lt;meta name=&quot;title&quot; content=&quot;Expedient Support Management Console&quot; /&gt;
  &lt;meta name=&quot;description&quot; content=&quot;Expedient Support Management Console&quot; /&gt;
  &lt;meta name=&quot;keywords&quot; content=&quot;Expedient Support Management Console&quot; /&gt;
  &lt;meta name=&quot;language&quot; content=&quot;en&quot; /&gt;
  &lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot; /&gt;
  &lt;title&gt;Temporarily Down for Maintenance&lt;/title&gt;
  
  &lt;style type=&quot;text/css&quot;&gt;&lt;!--
  * {
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: Arial,Sans-Serif;
    font-size: 0.75em;
    line-height: 1.5em;
    color: #444;
    background-color: #fff;
    margin: 20px;
    padding: 20px;
  }
  
  div.wrapper {
    position: relative;
    display: block;
    width: 500px;
    margin: 0 auto;
  }
  
  div.content {
    font-size: 1.3em;
    line-height: 1.4em;
    padding: 20px;
    background: #f8f8f8;
  }
  
  h1 {
    color: #333;
    font-size: 50px;
    line-height: 1.4em;
    font-weight: bold;
    margin: 20px 0;
  }
  
  p {
    margin: 10px 0;
  }
  
  strong {
    font-weight: bold;
  }
  
  --&gt;&lt;/style&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div class=&quot;wrapper&quot;&gt;
    &lt;h1&gt;Temporarily Down for Maintenance&lt;/h1&gt;
    &lt;div class=&quot;content&quot;&gt;
      &lt;p&gt;
        We are performing scheduled maintenance.  We should be back shortly.
      &lt;/p&gt;
      &lt;p&gt;
        If you need immediate assistance, please contact our support center at 1-888-227-9400.
      &lt;/p&gt;
      &lt;p&gt;
        &lt;a href=&quot;javascript:window.location.reload()&quot;&gt;Try again: Reload Page&lt;/a&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>