From:             frank dot neitzel at volkswagen dot de
Operating system: Windows 2003
PHP version:      5.1.4
PHP Bug Type:     MSSQL related
Bug description:  no functionable named mssql-connection and including files

Description:
------------
If I have to include a file per "require_once", the mssql-functions will
get an own life.

-- Life 1 --
#require_once("xxx.php");
$con4 = mssql_connect (....);
mssql_select_db (..., $con4);
...
->
    [Field1] => ...
    [Field2] => ...

-- Life 2 --
require_once("xxx.php");
$con4 = mssql_connect (....);
mssql_select_db (..., $con4);
...
->
    [1] => ...
    [2] => ...

-- so should it be and will work --
mssql_connect (....);
mssql_select_db (...);
...
->

    [1] => ...
    [Field1] => ...
    [2] => ...
    [Field2] => ...


Reproduce code:
---------------
<pre><?

#require_once("xxx.php");


 // named db-connection
 $con4 = mssql_connect ("db-intranet.han.vw.vwg", "xxx", "xxx");
 mssql_select_db ("VWN_Redax", $con4);
 $rst = mssql_query("exec vwn_redax.dbo.sp_get_groups_to_user @u_authuser
= 'devwag00\\eneitze'", $con4);
 $tblUsers = mssql_fetch_array($rst, $con4);
 print_r($tblUsers);

 // unnamed db-connection
 mssql_connect ("db-intranet.han.vw.vwg", "xxx", "xxx");
 mssql_select_db ("VWN_Redax");
 $rst = mssql_query("exec vwn_redax.dbo.sp_get_groups_to_user @u_authuser
= 'devwag00\\eneitze'");
 $tblUsers = mssql_fetch_array($rst);
 print_r($tblUsers);


?></pre>

Expected result:
----------------
    [0] => 1
    [tblRolesId] => 1
    [1] => Mitglied
    [tblRolesTitle] => Mitglied
    [2] => 3105
    [tblGroupsId] => 3105
    [3] => 2-C-1 FiSi Admin
    [tblGroupsTitle] => 2-C-1 FiSi Admin


Actual result:
--------------
    [0] => 1
    [1] => Mitglied
    [2] => 3105
    [3] => 2-C-1 FiSi Admin

or

    [tblRolesId] => 1
    [tblRolesTitle] => Mitglied
    [tblGroupsId] => 3105

... depends on including a file or not.

-- 
Edit bug report at http://bugs.php.net/?id=37708&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37708&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37708&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37708&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37708&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37708&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37708&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37708&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37708&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37708&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37708&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37708&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37708&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37708&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37708&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37708&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37708&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37708&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37708&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37708&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37708&r=mysqlcfg

Reply via email to