title: phalcon framework webtools not working when creating models, views and controllers
body: <p>I'm having some problems while trying to get phalcon webtools working. </p>
  
  <p>When using command line devtools I can create controllers and models without problems.</p>
  
  <p>However, things aren't that easy with the webtools. </p>
  
  <p>It correctly shows already created controllers and models:</p>
  
  <ul>
  <li>Controllers (<a href="http://i.imgur.com/IRWPaVJ.png" rel="nofollow">http://i.imgur.com/IRWPaVJ.png</a>)</li>
  <li>Models (<a href="http://i.imgur.com/rIbvbg9.png" rel="nofollow">http://i.imgur.com/rIbvbg9.png</a>)</li>
  </ul>
  
  <p>And I can also edit them (<a href="http://i.imgur.com/orJweLl.png" rel="nofollow">http://i.imgur.com/orJweLl.png</a>).</p>
  
  <p>Apparently, Db connexion is ok, since webtools shows every table in the DB:</p>
  
  <ul>
  <li>Models (<a href="http://i.imgur.com/iOkZfyo.png" rel="nofollow">http://i.imgur.com/iOkZfyo.png</a>)</li>
  <li>Scaffolding (<a href="http://i.imgur.com/5ZLRuq5.png" rel="nofollow">http://i.imgur.com/5ZLRuq5.png</a>)</li>
  </ul>
  
  <p>However, when trying to create a controller from the web interface, I got the next error: </p>
  
  <blockquote>
    <p>"Please specify a controller directory"</p>
  </blockquote>
  
  <p>Same when trying to create a Model from a database table :</p>
  
  <blockquote>
    <p>"Database configuration cannot be loaded from your config file"</p>
  </blockquote>
  
  <p>Or when trying to generate scaffold :</p>
  
  <blockquote>
    <p>"Adapter was not found in the config. Please specify a config variable
    [database][adapter]"</p>
  </blockquote>
  
  <p>My app/config/config.php content:</p>
  
  <pre><code>return new \Phalcon\Config(array(
      'database' =&gt; array(
          'adapter'     =&gt; 'Mysql',
          'host'        =&gt; 'localhost',
          'username'    =&gt; 'phalcon',
          'password'    =&gt; 'phalcon',
          'dbname'      =&gt; 'phalcon',
          'charset'     =&gt; 'utf8',
      ),
      'application' =&gt; array(   
          'controllersDir' =&gt; __DIR__ . '/../../app/controllers/',
          'modelsDir'      =&gt; __DIR__ . '/../../app/models/',
          'viewsDir'       =&gt; __DIR__ . '/../../app/views/',
          'pluginsDir'     =&gt; __DIR__ . '/../../app/plugins/',
          'libraryDir'     =&gt; __DIR__ . '/../../app/library/',
          'cacheDir'       =&gt; __DIR__ . '/../../app/cache/',
          'baseUri'        =&gt; '/phalconTest/',
  
      )
  ));
  </code></pre>
  
  <p>My public/webtools.config.php content:</p>
  
  <pre><code>define('PTOOLS_IP', '192.168.248.135');
  define('PTOOLSPATH', 'C:/phalcon-devtools');
  </code></pre>
  
  <p>My public/webtools.php:</p>
  
  <pre><code>use Phalcon\Web\Tools;
  require 'webtools.config.php';
  require PTOOLSPATH . '/scripts/Phalcon/Web/Tools.php';
  
  Tools::main(PTOOLSPATH, PTOOLS_IP);
  </code></pre>
  
  <p>Im running <strong>Phalcon 1.3.4 - Windows x86 for PHP 5.4.0 (VC9)</strong> </p>