TurnKey Linux Virtual Appliance Library

Enabling MS SQL support in the LAMP stack (SOLVED)

One of my projects requires my app to talk to an MS SQL service from time to time.

How does one setup the module to allow this as I currently get:

Call to undefined function mssql_query()

Alon Swartz's picture

FreeTDS

I just did a quick search and found the FreeTDS project,
It should be a simple install, not sure about configuration: apt-get update; apt-get install sqlrelay-freetds

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Not sure if this is what you are looking for, maybe someone who has a similar configuration could chime in.

Hope the above helps.

I think it's a case of having

I think it's a case of having to enable the already existing MSSQL components.  It's all there in the INI but just not available as a function to my programs.

The whole site is coded usig this syntax so I really hope I can find a way of getting it installed!!!

I might try a vanilla install and creating a custom appliance instead.

Okay, I've found this:

Okay, I've found this: http://www.howtoforge.com/installing_php_mssql_centos5.0

How do I go about doing the same thing on the LAMP Ubuntu appliance?

Alon Swartz's picture

Try this...

I have not tried this myself, just a little googling...

php5-sybase might work (it provides the php5-mssql package), but i read there are a couple of issues, which might be solved by using pear to install the mdb2 mssql driver.

apt-get install php5-sybase php-pear
pear install --nodeps MDB2_Driver_mssql

If that doesn't work, you can try and rebuild the php package to include mssql support:

http://panthar.org/2006/06/15/php-with-mssql-on-ubuntu-606/
http://ubuntuforums.org/showthread.php?t=350269
http://www.lecentre.net/blog/archives/144
https://lists.ubuntu.com/archives/ubuntu-server-bugs/2009-May/012906.html

Let us know how it goes, with your help we might include mssql support in the upcoming release.
 

 

Thank You

Alon Swartz: Just googling I ran over your post and I tried the two commands in your last post. They worked just fine for my lamp machine.

A big thank you.

Alon Swartz's picture

Excellent, thanks for the confirmation

Though it's too late for the pending 11.1 release, I've added it to my todo list for next release.

Alon Swartz:

Alon Swartz: A big thanks, this worked like a charm.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)