ID:               15400
 Comment by:       sang6iru at yahoo dot com
 Reported By:      john_woodhouse at hammond-logistics dot co dot uk
 Status:           Closed
 Bug Type:         MSSQL related
 Operating System: Windows 2000
 PHP Version:      4.1.1
 New Comment:

I have the same problem,...



Warning: MS SQL: Unable to connect to server: LOCAL in
E:\Inetpub\wwwroot\dprd\include\koneksi.php on line 20



Warning: MS SQL message: Login failed for user '(null)'. Reason: Not
associated with a trusted SQL Server connection. (severity 14) in
E:\Inetpub\wwwroot\dprd\include\koneksi.php on line 21



Warning: MS SQL: Unable to connect to server: (null) in
E:\Inetpub\wwwroot\dprd\include\koneksi.php on line 21



Warning: MS SQL: A link to the server could not be established in
E:\Inetpub\wwwroot\dprd\include\koneksi.php on line 21



>> I've fix some message :

Warning: MS SQL: Unable to connect to server: (sangbiru) in
E:\Inetpub\wwwroot\dprd\include\koneksi.php on line 21



by adding "sangbiru" user in > Computer Management > User&Group
Management....



but when I try to fix this problem by adding "(null)" user, I get the
message above... :( anyone could help me??


Previous Comments:
------------------------------------------------------------------------

[2002-04-02 04:02:44] john_woodhouse at hammond-logistics dot co dot uk

Excellent.. this works... Thanks Adrian..



Ok you can close this now.. :)

------------------------------------------------------------------------

[2002-03-27 06:38:39] phpstuff at aweiler dot com

*** SOLVED ***



If the configuration option "mssql.compatability_mode" is missing, then
php_mssql fails to initialize the procedure pointer for
"get_column_content". Looks like a bug, but can be avoided simply by
adding the configuration option:



mssql.compatability_mode = Off



May be it is the best to take php.ini-dist and copy the full [MSSQL]
section in your active php.ini.



Cheers,

Adrian

------------------------------------------------------------------------

[2002-03-27 04:53:34] phpstuff at aweiler dot com

The crash occurs only if the query returns any records.

The following example crashes on the last query. All others run fine
(appropriate access rights assumed ;-)



<?

  mssql_connect()

    or die ("Cannot open mssql\n");

  @mssql_query("DROP DATABASE test");

  mssql_query("CREATE DATABASE test")

    or die ("Cannot create database\n");

  mssql_select_db ("test")

    or die ("Cannot select database\n");

  mssql_query("CREATE TABLE foo (bar int)")

    or die ("Cannot create table\n");

  mssql_query("INSERT INTO foo (bar) VALUES (1)")

    or die ("Cannot insert into table\n");

  $res = mssql_query ("SELECT * FROM foo WHERE bar=2")

    or die ("DB error\n");

  echo "Before crashing query\n";

  $res = mssql_query ("SELECT * FROM foo")

    or die ("DB error\n");

?>



Using NT4 SP5 and tried with both PHP4.1.1 and 4.1.2

------------------------------------------------------------------------

[2002-03-13 14:14:25] nest at rts dot ru

The same problem. Win2K Pro, PHP 4.1.2

===PHP.INI

error_reporting= E_ALL; display all errors, warnings and notices

enable_dl=on

extension_dir=c:\php\extensions

extension=php_mssql.dll

===

<?php

        $h = mssql_connect("nest.rtsnet.ru,1433", "wwwuser", "***");

        mssql_select_db("WebInfo");

        $rs = mssql_query("SELECT * FROM foo");

?>

Running from command line or as CGI results in the fatal application
error. Any bug in query string results in normal PHP error message "MS
SQL:  Query failed in ....".

ODBC version works ok.

------------------------------------------------------------------------

[2002-02-06 09:19:17] john_woodhouse at hammond-logistics dot co dot uk

the [] were just there to denote what I was putting into them

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15400

-- 
Edit this bug report at http://bugs.php.net/?id=15400&edit=1

Reply via email to