View Full Version : PHP & MsSql
06-13-2006, 12:18 PM
I host a site off of my home PC that's main purpose is to house some PHP pages that work with a MsSql database. Unfortunately my site seems to be very unstable and likes to fall offline quite often. I thought that I could instead host those pages here at siteground on my site but it appears that MsSql support is not enabled on the server hosting my web according to a phpinfo page.
My question was, is this something that could be accomplished via a support ticket or is enabling MsSql support something that is not allowed on the servers? I just don't want to trouble the support personel if this is something that is not supported.
Thanks, I appreciate the excellent service provided by Siteground
06-15-2006, 09:56 AM
MySQL is supported on our servers, the problem with your script is most likely because you have not adjusted the database connection details for your scripts.
To transfer the pages from your computer to your SG account, you need to upload the files, take an SQL dump of your database, import it on the server (use cPanel -> MySQL Databases -> phpMyAdmin) and then re-configure the script to connect to the database on the server.
Please take a look at the official cPanel documentation for help on setting up databases and database users:
This may help as well:
I hope I was able to help. In case you are facing problems with this, please do post a support ticket -- it would be a pleasure to help you :)
06-15-2006, 12:15 PM
Thank you for your reply on how to use the MySQL databases and transfering them to SG. That is very helpful.
Unfortunately my question is about conecting to a MS SQL database (Microsoft SQL) via an ODBC connection.
The way I have it setup the page connects to the database via an ODBC connection. The database contains data that is constantly changing like character rankings that are displayed on the following page and many other helpful utilities that my users can access
What I was asking is, if it is possible to have the server that hosts my site setup so it will know how to handle the requests to the ODBC connection. Right now this is what I am getting when trying to load the same page that is displayed above:
Sorry, I should have been more descriptive on exactly what I was asking in my first post. Thanks again for your responce, I greatly appreciate everything you do for the community here Kenny.
06-21-2006, 08:32 AM
Nevermind this question. The more I thought about it I realize that this would require an ODBC connection setup on the server hosting my site so it can connect to the offsite MSSQL database. I imagine that's probably not something that's supported since it would either reqire me to remotely access the console and configure the connection or give out the username and password used to connect through the ODBC connection.
Thanks for your help, sorry for the noob question
P.S. If I'm wrong about this not being something supported please let me know...
06-22-2006, 08:38 AM
Sorry about not getting this in the first place. As far as I can gather, you have a Linux-based hosting account (http://www.siteground.com/), and want your php scripts to remotely access the MSSQL database running on your own server.
I am afraid ODBC is not supported on our shared linux hosting servers, but there is no problem for you to configure an odbc connection on a Windows-based hosting plan. The best you can do at this point is upgrade your account to ASP.NET. The ples control panel has an interface for creating ODBC connections, you should not have ny problems accessin the remote database.
06-22-2006, 10:29 AM
Thanks Kenny, I had no idea that was the difference from what I currently have and the asp.net hosting. I know there's a few different things asp.net can do that i've wanted to work with before, now I know another :D I'll go ahead and upgrade my account next payday.
Thanks Kenny, your the greatest!