Link to home
Start Free TrialLog in
Avatar of jonathanduane2010
jonathanduane2010

asked on

mySQL and php question

Hi Guys,

If i need to change the config file here

<?php
session_start();
return [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=livecrm_livecrm2',
            'username' => 'livecrm_livecrm2',
            'password' => 'livecrm2',
            'charset' => 'utf8',


			/*
			 'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
			*/
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@livefactory/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => false ,
						'transport' => [
							'class' => 'Swift_SmtpTransport',
							'host' => $_SESSION['smtp_host'],
							'username' => $_SESSION['smtp_username'],
							'password' => $_SESSION['smtp_password'],
							'port' => $_SESSION['smtp_port'],
							'encryption' =>$_SESSION['smtp_encryption'],// 'ssl',
						],
        ],
    ],
];

Open in new window


Do I change both instances or just one? Because i cant get it working here?

http://91.109.247.179/~radiocom/projects/livecrm/

Thanks for all your help
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Do I change both instances or just one? Because i cant get it working here?
Both instances of ... ?
Avatar of jonathanduane2010
jonathanduane2010

ASKER

'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=livecrm_livecrm2',
            'username' => 'livecrm_livecrm2',
            'password' => 'livecrm2',
            'charset' => 'utf8',


                  /*
                   'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
   /* <==== START COMMENT
                   'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8', 

Open in new window


There is only one configuration - the other items are commented out
Anything between
/*
*/
Is a comment.
If I browse to your URL I see only folders - I am expecting to see an index.php which does not exist. Are you sure
a) All files are uploaded
b) You are pointing to the right folder?
thanks Julian,

Ok i am think i am gettting somewhere now

http://91.109.247.179/projects/livecrm/web/

However i dont know what the error means
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial