Yii Framework Forum: Cdbconnection: Could Not Find Driver Mssql - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cdbconnection: Could Not Find Driver Mssql Rate Topic: -----

#1 User is offline   ItsYii 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 24-January 12

Posted 05 March 2013 - 04:59 AM

Hello

I'm trying to run my Yii app on a Live 3rd party server. The issue I have is that I'm using MSSQL on a completely different server. Currently I'm getting the error "CDbConnection failed to open the DB connection: could not find driver". The MSSQL database is using Windows Plesk (also 3rd party), the website is using Linux.

My Questions are

What are the missing drivers?
Where (Server/Folder) and How do I install them (if necessary)?

Thanks All
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 05 March 2013 - 05:02 AM

By the error message "Could not find server" I would say that the problem is in the connection settings or the database server setup... not in the missing drivers...

But if you think some drivers are missing... check the Yii requirements - http://www.yiiframew...on#requirements
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   ItsYii 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 24-January 12

Posted 05 March 2013 - 05:51 AM

View PostMaurizio Domba, on 05 March 2013 - 05:02 AM, said:

By the error message "Could not find server" I would say that the problem is in the connection settings or the database server setup... not in the missing drivers...

But if you think some drivers are missing... check the Yii requirements - http://www.yiiframew...on#requirements



I think that might be true, I can't seem to figure out how to write the connection String in a different server
This is what I attempted, if you can have a look

 'db'=>array(
		 
                            'connectionString' => 'sqlsrv:server=www.example.com ;database=something;',
							'tablePrefix'=>'dbo.',
							  'username'=>'root',
							'password'=>'password',
                       
                        ),



The server section is what confuses me, because the DB is on a different server I'm not sure how to get connected.

Thanks
0

#4 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 05 March 2013 - 06:08 AM

Instead of the domain try with the IP address of the server, also check if you can connect to that server with some management tool to see if the server is configured right for remote connection.
Find more about me.... btw. Do you know your WAN IP?
0

#5 User is offline   ItsYii 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 24-January 12

Posted 05 March 2013 - 08:39 AM

I can't seem to connect with anything, I emailed my provider so I'm just waiting. Everything passed on the requirements test except for the following

Quote

[PDO PostgreSQL extension Warning All DB-related classes This is required if you are using PostgreSQL database


Quote

Memcache extension Warning CMemCache




Quote

APC extension Warning CApcCache

Are they required?

Thanks
0

#6 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 05 March 2013 - 08:59 AM

Only if you want to use them... i.e. if you don't use postgres then you don't need the extension for it... same for the other two.
Find more about me.... btw. Do you know your WAN IP?
0

#7 User is offline   ItsYii 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 24-January 12

Posted 06 March 2013 - 08:29 AM

View PostMaurizio Domba, on 05 March 2013 - 08:59 AM, said:

Only if you want to use them... i.e. if you don't use postgres then you don't need the extension for it... same for the other two.


I'm able to connect to my DB via Microsoft Data Link .udl, however my problem still persists. I tried using the IP address but the error is still the same.

Thanks
0

#8 User is offline   ItsYii 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 24-January 12

Posted 20 March 2013 - 07:30 AM

I realised I didn't have PDO sqlsrv installed on my server using phpinfo(). My host was nice enough to install the driver and all is well.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users