I’m using yii1.1.5 and EasyPHP 5.3.2. I’m not able to use the Model Generator in Yii as it requires the PDO MySQL extension or PDO SQLite extension. Could any1 tell me how to enable either of them in EasyPHP. I did lots of research and i found that i need to edit my PHP.ini file. However when i edit it, there’s no change at all. Is there any other files that i need to edit?
I enabled the following by removing the semi colon in the PHP.ini:
extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
What other changes do i need to do in order to be able to use the Model Generator in Yii?
When i enable them through right click -> configuration -> PHP extensions, php_pdo_oci is in red and when i restart the server i get the following error messages twice:
This applciation has failed to start because OCI.dll was not found. Re-installing the application may fix this problem.
PHP Startup: Unable to load dynamic library ‘C:\easyphp\php\ext\php_pdo_oci.dll’ - The specified module could not be found.
Yes i already checked all the libraries are there including php_pdo_oci.dll.
I didnt enable php_pdo_oci.dll and enabled the other required libraries, then my requirements have changed. PDO SQLite and PDO MySQL extensions have now passed. however i’m still not able to use the model generator because when i click on it takes too much time and displays the following error messages:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\easyphp\www\yii\framework\db\CDbConnection.php on line 0
php_pdo_oci is not required if you don’t need oracle database…
in fact if you use only mysql… then you need only PDO for mysql…
The error you get is something else… have you created a database with some tables in mysql? have you edited config.php with appropriate data for connection to the database (connectionstring, username, password) ?
The application that i created already contains a table(tbl_user)
Main.php contains the following:
‘db’=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
When i click on Model Generator i get the following:
CDbException
Description
CDbConnection failed to open the DB connection: SQLSTATE[42000] [1049] Unknown database ‘testdrive.db’