ID: 45918 Comment by: igor dot kalashnikov at gmail dot com Reported By: dennis at pascolo dot nl Status: Open Bug Type: MSSQL related Operating System: Fedora Core 8 PHP Version: 5.2.6 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=45918&edit=1