Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep. 02, 2010, 07:48:12 PM
53844 Posts in 11998 Topics by 11375 Members
Latest Member: elizablackmore7
News:
 
The PRADO Community » Prado v3.x » Installation and Setup » Cannot run 'generate' in prado-cli « previous next »
Pages: 1 [2] Print
Author Topic: Cannot run 'generate' in prado-cli  (Read 7820 times)
sonemonu
Senior Member
***

Karma: 3
Offline Offline

Posts: 75


I'm a good software developer; I'm not a magician!


View Profile
« Reply #15 on: Mar. 01, 2008, 11:24:42 PM »

Yes, it is working for me to. Thanks hauru  Wink.
Logged
Hysteria
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #16 on: Mar. 06, 2008, 02:23:15 PM »

I have an other problem.
When I execute  :

generate users Application.database.UserRecord

I have this error :

Code:
Fatal error: Uncaught exception 'TDbException' with message 'TDbConnection faile
d to establish DB connection: could not find driver' in G:\prado\framework\Data\
TDbConnection.php:166
Stack trace:
#0 G:\prado\framework\Data\TDbConnection.php(143): TDbConnection->open()
#1 G:\prado\framework\Data\Common\TDbMetaData.php(52): TDbConnection->setActive(
true)
#2 G:\prado\framework\Data\ActiveRecord\TActiveRecordGateway.php(101): TDbMetaDa
ta::getInstance(Object(TDbConnection))
#3 G:\prado\framework\prado-cli.php(665): TActiveRecordGateway->getTableInfo(Obj
ect(TDbConnection), 'users')
#4 G:\prado\framework\prado-cli.php(607): PradoCommandLineActiveRecordGen->gener
ateActiveRecord(Object(TActiveRecordConfig), 'users', 'G:\blog\protect...')
#5 G:\prado\framework\prado-cli.php(757): PradoCommandLineActiveRecordGen->perfo
rmAction(Array)
#6 G:\prado\framework\3rdParty\PhpShell\PHP\Shell.php(839): PHP_Shell_Extensions
_ActiveRecord->generate('generate users ...')
#7 G:\prado\framework\3rdParty\PhpShell\php-shell-cmd.php(17): PHP_Shell->inp in
 G:\prado\framework\Data\TDbConnection.php on line 166
   
For your information, I activated the following php extensions:
extension=php_mysql.dll
extension=php_pdo_mysql.dll

Thank you in advance for your response.
Logged
okhayat
Junior Member
**

Karma: 1
Offline Offline

Posts: 39


By teaching you learn!


View Profile
« Reply #17 on: Mar. 07, 2008, 12:23:57 AM »

From the error message you're posting:
Code:
could not find driver

So, if you're using SQLite, maybe that's the problem, or, you should also check that php_pdo.dll is loaded and that you've reloaded/restarted your Apache.
Logged
Hysteria
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #18 on: Mar. 17, 2008, 02:20:15 PM »

I use MySQL and not SQLite.
Logged
Alisson
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #19 on: Jun. 16, 2010, 01:04:14 PM »

Hello friends, I'm from Brazil and I'm having trouble running the connection to the MySQL database ... Below is the error and my configuration file, hugs and thanks in advance!

Code:
D:\wamp\www>php d:/wamp/www/prado-3.1.6/framework/prado-cli.php shell www/pradoc
ontato
Command line tools for Prado 3.1.6.
+-----------------------------------------------------------------------------+
** Unable to load PRADO application in directory "www/pradocontato".
+-----------------------------------------------------------------------------+
PHP-Shell - Version 0.3.1
(c) 2006, Jan Kneschke <jan@kneschke.de>

>> use '?' to open the inline help

>> generate contato Application.database.ContatoRecord

Parse error: syntax error, unexpected T_STRING in D:\wamp\www\prado-3.1.6\framew
ork\3rdParty\PhpShell\php-shell-cmd.php(51) : eval()'d code on line 1
false
>>

Application.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<application id="pradocontato" mode="Debug">

  <paths>
   <using namespace="Application.database.*" />
  </paths>
 
  <modules>
    <module id="db" class="System.Data.TDataSourceConfig">
    <database ConnectinString="mysql:host=localhost;dbname=prado" username="root" password="" />
    </module>
   
    <module class="System.Data.ActiveRecord.TActiveRecordConfig" ConnectionID="db" />
  </modules>

  <services>
    <service id="page" class="TPageService" DefaultPage="Home" />
  </services>
</application>
Logged
Alisson
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #20 on: Jun. 16, 2010, 01:50:58 PM »

Erro line: <database ConnectinString="mysql:host=localhost;dbname=prado" username="root" password="" />

Ok: <database ConnectionString="mysql:host=localhost;dbname=prado" username="root" password="" />


affffffffffffffffff
Logged
Pages: 1 [2] Print 
« previous next »
Jump to: