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