View Full Version : Connecting to MSSQL
KonArtist 11-30-2010, 09:45 PM Hi guys.
I need advice/help. I purchased webhostinghub last night and its awesome. For the price and the features i get i was very excited to find it.
Today i attempted to connect to my MSSQL DB on another server though the web host but it turned out the connection can not happen. Why? Its a linux based server...
Does anyone know how i can make the connection work or should i just find another host?
If so, mind providing good windows web hosts?
Thanks,
Kon
kpmedia 11-30-2010, 09:50 PM How are you trying to connect?
Linux can connect to MSSQL, but true full ASP and ASP.NET won't run on Linux -- IIS required.
KonArtist 11-30-2010, 10:14 PM How are you trying to connect?
Linux can connect to MSSQL, but true full ASP and ASP.NET won't run on Linux -- IIS required.
Opps, i should have explained. I created a simple php file that connects to the MSSQL DB and queries. Very simple php file.
MikeDVB 11-30-2010, 10:35 PM PHP has to have support for MSSQL built into it, or it won't work.
Softsys Hosting 11-30-2010, 11:35 PM And if everything is in order, you will need to ensure that MS SQL connection port (default: 1433) is not blocked at your web server.
KonArtist 12-01-2010, 12:06 AM And if everything is in order, you will need to ensure that MS SQL connection port (default: 1433) is not blocked at your web server.
I am aware php has support for mssql. In the php.ini i enabled the extension for mssql.
So your suggesting i contact the Web server and inform them to open port 1433? I will do it now.
So Linux server running php5 supports connection to MSSQL DB? If its true, it makes me feel better. The way its set up on my Windows Server is php5 has the mssql.dll file in the extension folder and enabled. This works but im wondering how i would do it for the linux server...
KonArtist 12-01-2010, 01:42 AM Ok called them. They wont open the port for me. I'm cancelling my service with them.
Thanks for all the help,
If you have any good information on some web hosts, im all ears
Softsys Hosting 12-01-2010, 02:41 AM Sorry to hear this. If you have admin access to your db server, you can configure it to operate on alternative port which is supported by your website host. Alternatively, you can consider a Windows host who supports PHP and MS SQL since this would turn out to be a simple and cost effective setup for you.
Good luck!
KonArtist 12-01-2010, 09:38 AM Sorry to hear this. If you have admin access to your db server, you can configure it to operate on alternative port which is supported by your website host. Alternatively, you can consider a Windows host who supports PHP and MS SQL since this would turn out to be a simple and cost effective setup for you.
Good luck!
Changing the port would be too much of a hassle. After researching last night, HostGator was suggested to me. They are a Linux or Windows host which is perfect since i need Windows but the price is almost double than my previous host(i cancelled last night).
Thank you guys for all the help.
KonArtist 12-05-2010, 05:12 PM Ok it appears HostGator can not open port 1433 after one of the techs said they can open it.
Now i am back at square one. Can anyone suggest 1 or a couple web host servers that support opening Port 1433 or have mssql on their server?
kpmedia 12-05-2010, 11:31 PM Try EuroVPS.
On another note...
Why not use IIS7 for this? IIS7 has PHP (FastCGI) and native rewrites like Apache.
It may work better.
KonArtist 12-06-2010, 02:24 AM Try EuroVPS.
On another note...
Why not use IIS7 for this? IIS7 has PHP (FastCGI) and native rewrites like Apache.
It may work better.
Thank you for your suggestion, i will check them out tomorrow during work.
Sorry i am not familiar with IIS7(used in class once but thats about it) and FastCGI? Never heard of it. I usually just stuck to having xampp/apache installed on my server with php5. I hope EuroVPS has what i need :D
Edit: Just checked out EuroVPS, its a little to steep for me as all the prices are in Euro and the excharge rate would rape me. Thank you for the suggestion though.
I hope to find a windows host for a good price under 15$/month.
Crandion 12-06-2010, 03:06 AM MSSQL connection works pretty well from Linux PHP using pdo_dblib. If you have port/firewall problems, you could install Cygwin OpenSSH server on the Windows box and tunnel the DB connection with it. AutoSSH keeps the connection up if there are any problems.
kpmedia 12-06-2010, 05:57 AM Windows IIS7 vs Linux Apache.
FastCGI = PHP processing
At $15/monthly budget, maybe Coolwin.
But I still suggest EuroVPS. Exchange really isn't that bad.
Their 10 Euro plan comes out to $15 or less: http://eurovps.com/eng/hosting/ha_webhosting/ha_webhosting_windows/
tractor 12-06-2010, 06:29 AM I use NaviCat for MySQL from PremiumSoft and it works like a charm. I have it connected over the web to my hosted MySQL db and through my LAN to all of my PCs. I think it is well worth spending the time on setup.
MikeDVB 12-06-2010, 06:37 AM I cringe at the thoughts of using xamp for production hosting and I question whether you need Windows hosting since you're running Apache. Is there any reason you're going for MSSQL instead of MySQL?
kpmedia 12-06-2010, 06:46 AM Either keep MSSQL and question Apache.
Or keep Apache and question MSSQL.
That's what I'm looking at.
MikeDVB 12-06-2010, 06:50 AM Personally unless the application required Windows (Such as .NET) then I'd just go with Linux. The service will cost less due to less/no licensing costs and you'll still get access to Apache+PHP+MySQL. Honestly I can't think of any *good* reasons to use Apache+PHP+MSSQL myself, but hey ... maybe there is one (or more).
KonArtist 12-06-2010, 09:36 AM Personally unless the application required Windows (Such as .NET) then I'd just go with Linux. The service will cost less due to less/no licensing costs and you'll still get access to Apache+PHP+MySQL. Honestly I can't think of any *good* reasons to use Apache+PHP+MSSQL myself, but hey ... maybe there is one (or more).
Oh trust me. I would have LOVED to have mySQL running but i was not the one who set up the initial server. I dont know why he went with MSSQL instead of mySQL but he did and 3 months later i come around trying to find a web host. Switching from MSSQL to MySQL will be hell for our dev and we already have a full plate trying to fix the server. I wouldnt mind going with a Linux based server host but if only they allowed me to connect to my MSSQL DB to access a couple tables. I wouldnt have a problem transfering mssql->mysql but there are some stuff that cant be moved.
So i only have 1 option left, find a windows based web host. Unless someone knows of a Linux based web host who allows mssql access.
Thanks guys for the continuing help :D
MikeDVB 12-06-2010, 01:39 PM You would likely need to find a Windows Hosting Provider that offers PHP run by IIS and has the connector for MSSQL or go with a LinuxVPS and build in your own MSSQL Connector. Either way, it's not going to happen at your current provider from the sounds of it.
KonArtist 12-06-2010, 03:06 PM You would likely need to find a Windows Hosting Provider that offers PHP run by IIS and has the connector for MSSQL or go with a LinuxVPS and build in your own MSSQL Connector. Either way, it's not going to happen at your current provider from the sounds of it.
Ya im having a hard time find a good Windows Hosting provider that offers unlimited features.
LinuxVPS with my own MSSQL Connector?...Care to explain a bit further. It sounds like a good alternative for me if it works.
MikeDVB 12-06-2010, 03:54 PM Ya im having a hard time find a good Windows Hosting provider that offers unlimited features.Windows hosting hasn't been commoditized quite as bad as Linux hosting and, as such, you're generally going to pay for what you receive more so than you would with Linux.
LinuxVPS with my own MSSQL Connector?...Care to explain a bit further. It sounds like a good alternative for me if it works.
This post is rather old, but should get you on the right track if it's something you want to do:
http://www.mikedvb.com/2010/01/21/installing-apache-php-mysql-mssql-extension-on-centos5/
KonArtist 12-06-2010, 04:09 PM Windows hosting hasn't been commoditized quite as bad as Linux hosting and, as such, you're generally going to pay for what you receive more so than you would with Linux.
This post is rather old, but should get you on the right track if it's something you want to do:
http://www.mikedvb.com/2010/01/21/installing-apache-php-mysql-mssql-extension-on-centos5/
I just got a question about your guide, if i went with HostGator or any other Linux Host Provider who wont open Port 1433, would i still be able to do the guide? Keep in mind im just getting the web hosting package and not a dedicated server from them.
Mike, youve been a great help and i hope you can help me solve this thing once and for all. Not to say that everyone else wasnt helpful, i apperciate all the help i received.
MikeDVB 12-06-2010, 06:18 PM You would be on a vps, so you would have control over the firewall.
KonArtist 12-06-2010, 07:42 PM You would be on a vps, so you would have control over the firewall.
Whoa. i didnt know VPS could be so expensive. My search for Windows Host Provider continues, unless i find a linux based who can open the port for me.
MikeDVB 12-06-2010, 08:14 PM Whoa. i didnt know VPS could be so expensive. My search for Windows Host Provider continues, unless i find a linux based who can open the port for me.
Absolutely, it's like I said - you're not likely to find what you're after at what I would call an affordable rate. Beyond that, if you have a Host for your site in one facility and the MSSQL hosted in another facility the latency added to every query is going to be in addition to all other latency and will make any database driven site seem super slow and seem laggy.
You really don't want to have your database back end and your web front end in separate facilities. Honestly, I would go through the trouble of converting to MySQL or just go with a Windows host running IIS and PHP.
You're not going to find Windows providers offering what you can get on a Linux plan for the same price, so that's something you'll have to come to terms with.
KonArtist 12-06-2010, 08:37 PM Absolutely, it's like I said - you're not likely to find what you're after at what I would call an affordable rate. Beyond that, if you have a Host for your site in one facility and the MSSQL hosted in another facility the latency added to every query is going to be in addition to all other latency and will make any database driven site seem super slow and seem laggy.
You really don't want to have your database back end and your web front end in separate facilities. Honestly, I would go through the trouble of converting to MySQL or just go with a Windows host running IIS and PHP.
You're not going to find Windows providers offering what you can get on a Linux plan for the same price, so that's something you'll have to come to terms with.
Ok thanks. I'll try to think of something. Thanks for your help
drkossa 01-16-2011, 02:55 PM PHP has to have support for MSSQL built into it, or it won't work.
jwebhost 01-22-2011, 06:26 AM Hi people,
Does someone know a good poker calculator software for the use in online poker ?
Thanks
Thats fraud ;) And considered cheating on those sites so I Strongly advise you not to look for one unless you are going to make an on-line poker site.
legendofjon 01-24-2011, 06:14 PM why don't you ask their technical support?
|