Created
May 3, 2013 08:24
-
-
Save simonkberg/5507916 to your computer and use it in GitHub Desktop.
MsSQL for Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get dependencies | |
$ sudo apt-get install php5-sybase freetds-dev php5-dev -y | |
Move to user hoem directory | |
$ cd ~ | |
Get php5 source | |
$ apt-get source php5 | |
Move into the source code directory (substitute x.x with apropritate version number) | |
$ cd php5-x.x.x/ext/mssql | |
Phpize, configure and build extension | |
$ phpize | |
$ ./configure --with-mssql | |
$ sudo make | |
Navigate to extension | |
$ cd modules | |
Copy to php5 module directory (path might be different per configuration) | |
$ cp mssql.so /usr/lib/php5/20090626 | |
Edit php.ini | |
$ sudo vim /etc/php5/apache2/php.ini | |
Add "extension = mssql.so" (without the quotes) on a new line. | |
(use i-key to enter Insert-mode, paste, press Esc-key and save with :wq) | |
Restart Apache | |
$ sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment