Does anyone know why mssql_connect would be slow? PHP is running on a Linux server with FreeTDS. I am trying to connect to a remote database. When I connect from PHP it takes about 3 seconds, but if I use the FreeTDS tsql command from the shell it connects in under a second, so it is able to connect faster. Is there a setting I can change or a different driver I should use?
Asked
Active
Viewed 799 times
2
-
Do you have enough remaining database connections? – user1474090 Oct 12 '12 at 16:10
1 Answers
0
You should start using PDO with MSSQL driver support.
More info on:
And some examples:

Community
- 1
- 1
-
PDO is just as slow. I think it uses the same driver as mssql_connect. Also for some reason it also crashes after connecting and I get an empty response. – Meir Oct 12 '12 at 17:17