Advertisement

09.22.2008 at 10:12AM PDT, ID: 23752131
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

PHP script will not connect to SQL Server 2000

Asked by OSLTech in PHP and Databases, MS SQL Server, PHP for Windows

Tags: ,

I recently moved my company's Intranet to a new server.  Since I moved it, none of the SQL connections will work (except localhost connections).  The web page is supposed to run the SQL query and grab the results.  The Web page worked fine on the previous server, which leads me to believe the code itself is fine.

The web server is running IIS 6 on Windows Server 2003
The SQL Server is running SQL Server 2000 on Windows Server 2003
I have turned off the Windows firewall on both servers (The new web server and the SQL Server)
I've checked everywhere I can think of in SQL Server, but it does not appear to be blocking the web server.

I would appreciate any thoughts.  I suspect it has something to do with an IIS or PHP setting, but I don't know where to look.

The attached code is the page I call to connect to the database

Thanks
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
<?php
//SQL Function : TouchStar Database
function con($sql)
	{
		global $sql;
		
		$database = "TouchStar"; //DB name
		$db = mssql_connect("SQLServer","sa","Password");
		mssql_select_db("TouchStar",$db);
		//Check to see if it selects the database without any errors.
		if (!mssql_select_db($database))
			{
				echo("<p align=\"center\"><font face=\"Verdana\"><font color=\"#FF0000\"><b><font size=\"4\">* Internal Server Error *</font><br>
							</b></font><br>
							<font color=\"#FF0000\" size=\"2\">Database connection lost, please contact IT Department.</font></font></p>");
			}
	
		$result = mssql_query($sql,$db);
		return $result;
	}
//End of SQL Function
?>
 
Loading Advertisement...
 
[+][-]09.22.2008 at 10:26AM PDT, ID: 22542028

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 11:04AM PDT, ID: 22542348

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 11:29AM PDT, ID: 22542564

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 12:57PM PDT, ID: 22543443

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 05:18PM PDT, ID: 22545454

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.23.2008 at 06:52AM PDT, ID: 22549295

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.24.2008 at 03:51PM PDT, ID: 22564869

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 06:51AM PDT, ID: 22569063

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 03:39PM PDT, ID: 22574682

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, MS SQL Server, PHP for Windows
Tags: php, Internet Explorer 7.
Sign Up Now!
Solution Provided By: nmcdermaid
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.26.2008 at 07:32AM PDT, ID: 22579883

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628