Deploying Yii On Internet

Hi everyone,

I have an app ready for deployment. My ISP has only one folder where I can put the yii framework and this is has the unchangable name of private. This folder cannot be accessed by web users. I get:

Error 500

CDbConnection failed to open the DB connection.

My folder structure is like this:


















In my index.php I have changed the path to framework


// change the following paths if necessary





In my config/main.php:


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(



	// preloading 'log' component


	// autoloading model and component classes






		// uncomment the following to enable the Gii tool





			// If removed, Gii defaults to localhost only. Edit carefully to taste.








	// application components



			// enable cookie-based authentication


                        'class' => 'WebUser',







		// uncomment the following to enable URLs in path-format














			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',





		// uncomment the following to use a MySQL database



			'connectionString' => 'mysql:host=localhost;dbname=rouleur',

			'emulatePrepare' => true,

			'username' => 'username',

			'password' => 'password',

			'charset' => 'utf8',





			// use 'site/error' action to display errors








					'levels'=>'error, warning',


				// uncomment the following to show log messages on web pages









	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']


		// this is used in contact page




I have made a database on my ISP’s server with a username and password that I have included in the main config file

What could be the problem?

The problem could be that the db server is not localhost, or it could be that it requires you to specify a port number.

Thanks very much, this is a question I should have asked of my ISP. This is my first time to put any web development on a live server. I’m such a noob. Thanks again and I am hooked on yii framework