tags:

views:

43

answers:

2

I am using SQL Server as my backend for program.when i am try to connect with database which not shows any type of errors,but it is not working.Which is not getting connection.

My code is like

mssql_connect('servername', 'db_user', 'db_password') or die('Error');

The funny thing is which is not connecting and also which is not show message Error.

How can we enable SQL Server configuration using php program (what is the script for that.not manually). How could we know the actual status of SQL Server in server?

My application is working properly in local;the problem is about public hosting.

A: 

I would bet it is localhost, I have, nor do I ever wish to, see the database sitting on the same server as the website. Check in your hosting control panel for the proper connection string.

Dustin Laine
Thank you for your comment.Actually which is not localhost.there is a problem when i am post the query.Sorry.Let me know what will be the problem for my question
Ajith
If it works locally, then it has to be permissions/credential issues. Double check your username and password.
Dustin Laine
+1  A: 

turn on error_reporting in your php.ini. it might be some other section of code that is causing the issue, since you say that it doesn't go to die part. try checking first if it even goes to the mysql_connect() part. if possible post a part of your code around the mysql_connect.

pinaki