php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15532 Fails to connect to MSSQL server
Submitted: 2002-02-12 20:20 UTC Modified: 2002-02-15 12:57 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: brett at infopop dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.1.1 OS: Win2k Server
Private report: No CVE-ID: None
 [2002-02-12 20:20 UTC] brett at infopop dot com
<?
$hostname = "servername";
$username = "Threads";
$password = "Threads";
$dbName = "Threads";

mssql_connect($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbName) or DIE("Table unavailable");

$query = "SELECT * FROM users";

$result = MSSQL_QUERY($query);

$number = MSSQL_NUM_ROWS($result);

$i=0;

if ($number == 0) :
	print "No data?";
elseif ($number > 0) :
	print "Data:";
	while ($i < $number) :
		$name = mssql_result($result,$i,"Name");
		print $name;
		print "";
		$i++;
	endwhile;
endif;
?>

Effectively this script fails to connect to the database:

Fatal error: Call to undefined function: mssql_connect() in e:\apache\apache\htdocs\mssql_connect.php on line 7

The php_mssql.dll has been placed in both the includes and the WINNT\system32 directories and those lines have been uncommented to include those files.

the php.ini file has had it's included path altered correctly for DOS pathing

Apache has been stopped and restarted between changes.

Thank you!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-15 12:57 UTC] sander@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 12:01:29 2024 UTC