Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Probleme De Bdd Lors De L'export Sur Serveur Distant

$
0
0
Salut a tous,
Je suis dev web depuis un an et quelques mois, je code habituellement sur codeigniter ou "from scratch" mais pour les besoin d'un site j'ai eu besion de yii.
Donc aucun probleme de dev en local, tout ce passe bien...
Jusqu'a ce que j'exporte mon site sur serveur mutualisé:

j'ai ceci:

CDbException

\www\CyxisOnline\yii\framework\db\CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }


Stack:

#7 	
–
\www\CyxisOnline\protected\models\TblUser.php(21): CActiveRecord::model("TblUser")

16      * @param string $className active record class name.
17      * @return TblUser the static model class
18      */
19     public static function model($className=__CLASS__)
20     {
21         return parent::model($className);
22     }
23 
24     /**
25      * @return string the associated database table name
26      */

#8 	
–
\www\CyxisOnline\protected\components\UserIdentity.php(41): TblUser::model()

36     private $_id;
37     
38     public function authenticate()
39     {
40         
41         $record= TblUser::model()->findByAttributes(array('username'=>$this->username));
42         if($record===null)
43         {
44             $this->_id='user Null';
45             $this->errorCode=self::ERROR_USERNAME_INVALID;
46         }

#9 	
–
\www\CyxisOnline\protected\models\LoginForm.php(52): UserIdentity->authenticate()

47     public function authenticate($attribute,$params)
48     {
49         if(!$this->hasErrors())
50         {
51             $this->_identity=new UserIdentity($this->username,$this->password);
52             if(!$this->_identity->authenticate())
53                 $this->addError('password','Incorrect username or password.');
54         }
55     }
56 
57     /**
#13
\www\CyxisOnline\protected\controllers\SiteController.php(94): CModel->validate()

89         // collect user input data
90         if(isset($_POST['LoginForm']))
91         {
92             $model->attributes=$_POST['LoginForm'];
93             // validate user input and redirect to the previous page if valid
94             if($model->validate() && $model->login())
95                 $this->redirect(Yii::app()->user->returnUrl);
96         }
97         // display the login form
98         $this->render('login',array('model'=>$model));
99     }
#21 	
\www\CyxisOnline\index.php(13): CApplication->run()

08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();


Mon code de co:
// uncomment the following to use a MySQL database
		
		'db'=>array(
			'connectionString' => 'mysql:host=xxxx.olikeopen.com;dbname=xxxxx_cyxismaindb',
			//'emulatePrepare' => true,
			'username' => 'xxxxxx',
			'password' => 'xxxxxx',
			//'charset' => 'utf8',
		),



a savoir que j'ai verifié les requisit sur le serveur et PDO MySQL est instalé, le serveur tourne en php 5,3

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>