#45918 [NEW]: Mssql_init randomly returns a warning or a resource
[email protected] ("dennis at pascolo dot nl")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: dennis at pascolo dot nl
Operating system: Fedora Core 8
PHP version: 5.2.6
PHP Bug Type: MSSQL related
Bug description: Mssql_init randomly returns a warning or a resource
Description:
------------
When i try to connect to Mssql I randomly encounter warnings with "unable
to init stored procedure".
Whenever i try to run the query seperatly in Microsoft SQL Server
Management Studio Express the query never fails, so i don't think this is
an SQL-server problem.
When i refresh the website often i can see one time it returns a resource
(which is good) 'resource(92, mssql statement)'
or a warning 'Warning: mssql_init() [function.mssql-init]: unable to init
stored procedure in /var/www/html/test/app/controllers/TestController.php
on line 40'
That TestController sets up a persistent connection and initializes a
stored procedure. That's it, nothing more nothing less.
The expected result en the actual result keep randomly appearing
Reproduce code:
---------------
$a = mssql_pconnect($server, $username, $password);
var_dump($a);
var_dump(is_resource($a));
$b = mssql_init("dbo.$procedure") or die(mssql_get_last_message());
var_dump($b);
Expected result:
----------------
resource(91, mssql link persistent)
boolean true
resource(92, mssql statement)
Actual result:
--------------
resource(91, mssql link persistent)
boolean true
Warning: mssql_init() [function.mssql-init]: unable to init stored
procedure in /var/www/html/test/app/controllers/TestController.php on line
40
--
Edit bug report at http://bugs.php.net/?id=45918&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45918&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45918&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45918&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45918&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45918&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45918&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45918&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45918&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45918&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45918&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45918&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45918&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45918&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45918&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45918&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45918&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45918&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45918&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45918&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45918&r=mysqlcfg