• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and SQL Server from Linux

#1
[eluser]dimas[/eluser]
Hi,

I'm actually developing a CI app in my developer machine with Windows and XAMPP, using de sqlsrv driver to connect to the MS SQL Server 2008 database.

But the final server machine is an Ubuntu server, and trying to run the app from there doesn't work because of the sqlsrv driver not installed in the server.

I tried the mssql driver and the app starts to load but it ends with SQL queries errors (SQL queries previously tested and working).

What do you recommend me?
Is it possible to connect from Linux/PHP/CI to SQL Server 2008? If there is a way, will it be as fast as running on Windows?
Is it better to create a new Windows server?

Thx

#2
[eluser]rufnex[/eluser]
You have to install a SQL Server Driver on Linux:

http://www.freetds.org/

or

http://msdn.microsoft.com/en-us/library/....110).aspx

I use for a project the freetds witch works easy and fast.

#3
[eluser]dimas[/eluser]
[quote author="rufnex" date="1413823198"]You have to install a SQL Server Driver on Linux:

http://www.freetds.org/

or

http://msdn.microsoft.com/en-us/library/....110).aspx

I use for a project the freetds witch works easy and fast.[/quote]

freetds is not compatible with UTF-8 :-(

#4
[eluser]rufnex[/eluser]
UTF-8 is a problem from the sql server .. so you need freetds > 7.0 look here for details:

http://stackoverflow.com/questions/13377...-extension

#5
[eluser]dimas[/eluser]
[quote author="rufnex" date="1413906607"]UTF-8 is a problem from the sql server .. so you need freetds > 7.0 look here for details:

http://stackoverflow.com/questions/13377...-extension[/quote]

A problem from the SQL Server? In SQL Server I can specify the encoding of the fields to UTF8, and with the sqlsrv PHP library for Windows I can get data from the server in UTF8. I think this is more a problem of the Linux libraries :-(

Transforming it manually isn't a good option.. but maybe is the unique, thx Sad

#6
[eluser]rufnex[/eluser]
Ok, but have you tried the tip from stackoverflow?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
2 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.