Is it possible to get mssql_connect() to work?
In our server space hosted with inmotion, php.ini has extension=php_mssql.dll commented out. Will uncommenting it work, or is that possible?
In order to use the <strong>mssql_connect()</strong> PHP function on your Linux VPS server, this would first require both the <a href="http://www.unixodbc.org/" target="_blank">unixODBC drivers</a> and the <a href="http://www.freetds.org" target="_blank">FreeTDS library</a> to be installed on the server. This is because the TDS (Tabular Data Stream) protocol that Microsoft uses for their MSSQL databases is closed source, while this implementation of the protocol is open source and free to run on Linux.
Once <strong>FreeTDS</strong> has been installed on the server the following file needs to be updated to reflect compiling PHP with MSSQL support:
<pre class="code_block" style="width: 500px; white-space: normal; margin-bottom: -30px;">/var/cpanel/easy/apache/rawopts/all_php5</pre>
<pre class="code_block" style="width: 500px; white-space: normal; margin-bottom: -30px;">-with-mssql=/usr/local/freetds</pre>
Then the <strong>EasyApache</strong> script would need to be run on the server to recompile PHP with the MSSQL support.
This is something that you can have installed on your VPS for a one-time <strong>$25 installation fee</strong>. If you're interested in MSSQL support for your PHP scripts, you can <a href="http://www.inmotionhosting.com/support/website/getting-started-guides/submitting-and-checking-on-status-of-tickets" target="_blank">submit a verified ticket</a> to have our system administration team complete the installation for you.
Alternatively, if you're already aware of the full installation process you could also request <a href="http://www.inmotionhosting.com/support/edu/whm/intro-to-web-hosting/standard-vs-root-access" target="_blank">root access</a> to your VPS to perform the installation yourself.
Like this Question? Tweet