Go Online - Real World Server - Index.php

Hello everybody,

I managed to complete my first project with Yii.

I tried to get online.

When i write mydomain_name.com i see the message:

"The server encountered an internal error." etc

My localhost/mydomain_name works without problems.

Do i have to change something in the index.php?

Such as




Hi @leo80

Did you upload both your project and the Yii framework on your server?

Yii framework is on the right path?

Also your server may has settings that not show the warnings and errors

Trace step by step your code by echoes among each line and die() php function

Thank you for the reply,

I have uploaded the Yii framework with my project.

Yii is on the right path.

Ok, check the variables of index.php . Also set reporting error to All


ini_set('error_reporting', E_ALL);



defined('YII_DEBUG') or define('YII_DEBUG',true);

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

echo $yii.'<br/>';

echo $config;



I found the error.

I had an extra space between quotes at "connectionString" configuration.

I changed the code to:


	'connectionString' => 'mysql:host=host_server.com;dbname=db_my_name;',	

	'emulatePrepare' => true,

	'username' => 'my_name',

	'password' => 'my_pas',				

	'charset' => 'utf8',


As Anyone has to take into consideration the various settings (and php-mysql version). Also Anyone has to check the little changes between localhost and online server :)

There were a lot of time that I forgot to do this correctly, but I take the connection error and corrected it

Your server was configured to not displays error messages, So it was difficult to identify the error