Bug #45918 [Opn->Wfx]: Mssql_init randomly returns a warning or a resource

From: Date: Sat, 15 Oct 2016 23:13:01 +0000
Subject: Bug #45918 [Opn->Wfx]: Mssql_init randomly returns a warning or a resource
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204803@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=45918&edit=1 ID: 45918 Updated by: kalle@php.net Reported by: dennis at pascolo dot nl Summary: Mssql_init randomly returns a warning or a resource -Status: Open +Status: Wont fix Type: Bug Package: MSSQL related Operating System: Fedora Core 8 PHP Version: 5.2.6 Block user comment: N Private report: N New Comment: With MSSQL being removed from PHP as of PHP7.0, and ext/mssql not having a maintainer, I'm gonna close this report as a Won't fix, until maybe one day it will find a new maintainer. Alternatively you can use sqlsrv from Microsoft if you are on Windows, or pdo_dblib if you are on Unix. Previous Comments: ------------------------------------------------------------------------ [2009-09-07 08:14:33] igor dot kalashnikov at gmail dot com Just reproduced a problem. I found that error is returned when the procedure is initialized second time without execution of first (in my case). In other cases all is normal. ------------------------------------------------------------------------ [2008-08-26 09:19:59] dennis at pascolo dot nl 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 this bug report at https://bugs.php.net/bug.php?id=45918&edit=1

« previous php.bugs (#204803) next »