Comments (33)
Not sure if directly related, but I am seeing the function sequence error appear randomly on different usage scenarios.
All of them when trying to iterate over a client buffered result set.
from msphpsql.
Hi david-garcia-garcia can you explain some of the usage scenarios that are causing the sequence error. I am with the team at Microsoft that own's this driver. I might be able to help you out.
from msphpsql.
The case was too complex and would need investigation to really isolate the steps to reproduce. But it did share something similar with the sample script I provided in the same comment:
- The error came and go intermitently (one request with error, the next one without, and so on...)
- The error appeared after previous operations on the same connection dealt with failing transactions and rollbacks.
If you could get to reproduce the error with the provided script there's a chance that both of them are indeed the same bug.
from msphpsql.
I am seeing this error consistently on Drupal 8 - MSSQL integration (and is preventing any further development because it breaks man automated tests...).
Unluckily, the circumstances that lead to the error are so complex that I was unsuccessfull at isolating a test script. I even tried to PROXY all operations on Drupal's database abstraction layer to later reproduce every single operation done against the PDO driver without luck, the error simply won't reproduce.
If you are interested in helping solve this out to get D8 working on MSSQL Server, I can provide the exact steps to reproduce on a clean D8 install. You will need the -dev version of the SQL Server driver for Drupal - that I can only share privately at the moment.
from msphpsql.
I’d love to take a look at this.
Can you share the repro steps and the dev version driver?
Thanks
From: Davvid [mailto:[email protected]]
Sent: Monday, July 20, 2015 6:36 AM
To: Azure/msphpsql
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
I am seeing this error consistently on Drupal 8 - MSSQL integration (and is preventing any further development because it breaks man automated tests...).
Unluckily, the circumstances that lead to the error are so complex that I was unsuccessfull at isolating a test script. I even tried to PROXY all operations on Drupal's database abstraction layer to later reproduce every single operation done against the PDO driver without luck, the error simply won't reproduce.
If you are interested in helping solve this out to get D8 working on MSSQL Server, I can provide the exact steps to reproduce on a clean D8 install. You will need the -dev version of the SQL Server driver for Drupal - that I can only share privately at the moment.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-122886221.
from msphpsql.
Steps to reproduce:
- Download a fresh copy of D8: git clone --branch 8.0.x http://git.drupal.org/project/drupal.git
- Setup the site on IIS (see attached phpinfo() for enabled extensions and overal configuration)
- Unzip the SQL Server driver to the root of drupal, this will show you SQL Server as an available target during the install process.
- Install on SQL Server
- Go to /admin/modules and enable the "testing" module
- Go to /admin/config/development/testing and enable the \Drupal\search\Tests\SearchNumbersTest inside the "Search" group.
- Set a breakpoint in line 183 of \core\modules\dblog\src\Controller\DbLogController.php (this is the loop where the error happens)
- Run Tests. When the breakpoint is hit use F10 (Visual Studio + PHP Tools to debug) to step through about 4 times, the exception is thrown.
I found out that completely removing transaction management from the Drupal driver prevents the error from happening.
https://drive.google.com/file/d/0B2bjxiZ1Bb4BZmxNWnd1YmFpdDg/view?usp=sharing
(zip with sqlsrv driver, phpinfo() dump and screenshot of the exception)
Good luck. At least the exception is consistently reproducible.
Greetings
from msphpsql.
Any luck with this? D8 is to be released before the end of the year, it would be nice to have it working on MSSQL shortly before that happens.
from msphpsql.
I'm looking into it. I'll,keep you posted on that. Give me a week, since I was out of town.
Thanks
Sent from my iPad
On Aug 4, 2015, at 11:03 PM, Davvid <[email protected]mailto:[email protected]> wrote:
Any luck with this? D8 is to be released before the end of the year, it would be nice to have it working on MSSQL shortly before that happens.
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-127882620.
from msphpsql.
Do not use the latest D8 HEAD, download something from the date of my original post. Recent changes in D8 have broken the MSSQL driver for Drupal.
from msphpsql.
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
from msphpsql.
I’ll take a look at this tonight, in my Mac
I’ll keep you posted
From: Davvid [mailto:[email protected]]
Sent: Thursday, August 6, 2015 10:57 AM
To: Azure/msphpsql [email protected]
Cc: Luiz Fernando Santos [email protected]
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-128458978.
from msphpsql.
When I’m trying to create the SQL Server database in Drupal 8, I’m getting the following error in the PHP56 error_log file:
[11-Aug-2015 22:04:27 America/Los_Angeles] PHP Fatal error: Call to undefined function Drupal\Driver\Database\sqlsrv\wincache_ucache_get() in C:\inetpub\wwwroot\drupal\drivers\lib\Drupal\Driver\Database\sqlsrv\Connection.php on line 607
Any clue?
From: Davvid [mailto:[email protected]]
Sent: Thursday, August 6, 2015 10:57 AM
To: Azure/msphpsql [email protected]
Cc: Luiz Fernando Santos [email protected]
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-128458978.
from msphpsql.
Hey Davvid,
I used the very first connector you sent me (used both versions in total) and the error below happens:
[13-Aug-2015 20:36:28 America/Los_Angeles] PHP Fatal error: Declaration of Drupal\Driver\Database\sqlsrv\Schema::addIndex() must be compatible with Drupal\Core\Database\Schema::addIndex($table, $name, $fields, array $spec) in C:\inetpub\wwwroot\drupal\drivers\lib\Drupal\Driver\Database\sqlsrv\Schema.php on line 41
From: Luiz Santos <[email protected]mailto:[email protected]>
Date: Tuesday, August 11, 2015 at 10:09 PM
To: Azure/msphpsql <[email protected]mailto:[email protected]>, Azure/msphpsql <[email protected]mailto:[email protected]>
Subject: RE: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
When I'm trying to create the SQL Server database in Drupal 8, I'm getting the following error in the PHP56 error_log file:
[11-Aug-2015 22:04:27 America/Los_Angeles] PHP Fatal error: Call to undefined function Drupal\Driver\Database\sqlsrv\wincache_ucache_get() in C:\inetpub\wwwroot\drupal\drivers\lib\Drupal\Driver\Database\sqlsrv\Connection.php on line 607
Any clue?
From: Davvid [mailto:[email protected]]
Sent: Thursday, August 6, 2015 10:57 AM
To: Azure/msphpsql <[email protected]mailto:[email protected]>
Cc: Luiz Fernando Santos <[email protected]mailto:[email protected]>
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-128458978.
from msphpsql.
call to undefined function Drupal\Driver\Database\sqlsrv\wincache_ucache_get()
You need the Wincache PHP extension for the MSSQL driver to work.
Declaration of Drupal\Driver\Database\sqlsrv\Schema::addIndex() must be compatible with Drupal\Core\Database\Schema::addIndex($table, $name, $fields, array $spec)
I already published the driver on Drupal.org (https://www.drupal.org/project/sqlsrv).
You can see that the latest commit has this issue fixed and the method has the correct signature.
(line 1601)
from msphpsql.
Got any troubles to repro the issue? The latest dev from drupal.org should be working flawlessly to get past install.
https://www.drupal.org/project/sqlsrv
from msphpsql.
Hi Davvid,
I was out in a family trip until Sunday. I’m back to work today. Before going out, I set up the whole environment, but I could not run the test successfully.
It just do not run. I did not have time to investigate the issue, which I’m planning to do today.
I’ll let you know.
From: Davvid [mailto:[email protected]]
Sent: Thursday, August 20, 2015 6:44 AM
To: Azure/msphpsql [email protected]
Cc: Luiz Fernando Santos [email protected]
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Got any troubles to repro the issue? The latest dev from drupal.org should be working flawlessly to get past install.
—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f49%23issuecomment-133011874&data=01%7c01%7clfsantos%40microsoft.com%7caed3e59f63794c02353b08d2a9657296%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=YHIlHM4SOlCokQLg5GA6IFMARt%2fCJtLMHMNWUuFnkPU%3d.
from msphpsql.
I verified that this is still reproducible on lateset dev of driver and core.
It just do not run
That is weird, at least you should be seeing an error of some sort. I've sometimes experienced the progress bar getting stuck forever, but those bugs were already fixed.
from msphpsql.
That was exactly the behavior I’ve got.
I’ll continue investigating on my end.
Thanks
From: Davvid [mailto:[email protected]]
Sent: Wednesday, September 2, 2015 7:06 PM
To: Azure/msphpsql [email protected]
Cc: Luiz Fernando Santos [email protected]
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
I verified that this is still reproducible on lateset dev of driver and core.
It just do not run
That is weird, at least you should be seeing an error of some sort. I've sometimes experienced the progress bar getting stuck forever, but those bugs were already fixed.
—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f49%23issuecomment-137301281&data=01%7c01%7clfsantos%40microsoft.com%7cebe800f891614c31d06508d2b4044817%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=uvwgyq5Qcho6vWQNwUmYo7BIzX6YT5onop7xVhDlFrY%3d.
from msphpsql.
I just posted a repro script for another issue in #50.
I have the feeling that both #49 and #50 might be the same thing as they both seem to exhibit themselves when a PDO exception is thrown (and managed by the user!) while inside a transaction.
So it might be worth taking a look at #50 first given that it is an "easy" stand alone single file repro script.
from msphpsql.
I sent it to my team for investigation.
As soon as they find something, I'll reply back to you.
Sent from my iPad
On Sep 4, 2015, at 8:52 AM, Davvid <[email protected]mailto:[email protected]> wrote:
I just posted a repro script for another issue in #50https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f50&data=01%7c01%7clfsantos%40microsoft.com%7c26ca8d5cc4c24e91a81608d2b540c531%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=LJ03hTOp1NdUUt2R1%2bR0fIG5FuaAkGNRbTDkXNFjwQ8%3d.
I have the feeling that both #49https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f49&data=01%7c01%7clfsantos%40microsoft.com%7c26ca8d5cc4c24e91a81608d2b540c531%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=18fJyDJ3C7%2f210IE6MCGM3Qu7Tp3VDaaZpr6zLk6Uls%3d and #50https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f50&data=01%7c01%7clfsantos%40microsoft.com%7c26ca8d5cc4c24e91a81608d2b540c531%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=LJ03hTOp1NdUUt2R1%2bR0fIG5FuaAkGNRbTDkXNFjwQ8%3d might be the same thing as they both seem to exhibit themselves when a PDO exception is thrown (and managed by the user!) while inside a transaction.
So it might be worth taking a look at #50https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f50&data=01%7c01%7clfsantos%40microsoft.com%7c26ca8d5cc4c24e91a81608d2b540c531%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=LJ03hTOp1NdUUt2R1%2bR0fIG5FuaAkGNRbTDkXNFjwQ8%3d first given that it is an "easy" stand alone single file repro script.
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f49%23issuecomment-137774580&data=01%7c01%7clfsantos%40microsoft.com%7c26ca8d5cc4c24e91a81608d2b540c531%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=eoeDFNBhL2S8RZ2F9g0qIo%2bNjY%2f67inihRoRnjziyp8%3d.
from msphpsql.
I am also getting the [Microsoft][ODBC Driver Manager] Function sequence error.
$q = "SELECT * FROM ".TBL_USERS." WHERE username = '$username'"; $stmt = sqlsrv_query($this->connection, $q, array(),array( "Scrollable" => 'static' )); if(!$stmt || (sqlsrv_num_rows($stmt) < 1)){ error_log("getUserInfo failed for $username: $q",3,'error.log'); sqlsrv_free_stmt($stmt); return NULL; } else { /* Return result array */ sqlsrv_next_result($stmt); $dbrow = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC); if($dbrow === false) { error_log("dbrow is false\n",3,"error.log"); if( ($errors = sqlsrv_errors() ) != null) { foreach( $errors[0] as $key=>$error ) { error_log("$key -> $error\n",3,"error.log"); } } } elseif (is_null($dbrow)){ error_log("dbrow is NULL\n",3,"error.log"); } else { error_log("dbrow is OK\n",3,"error.log"); } }
It appears whenever I call the sqlsrv_fetch_array function.
from msphpsql.
@agrarian What version of driver are you using?
from msphpsql.
v4.0.1https://github.com/Azure/msphpsql/releases/tag/v4.0.1
Terry
From: Meet Bhagdev [mailto:[email protected]]
Sent: Tuesday, March 15, 2016 3:14 PM
To: Azure/msphpsql [email protected]
Cc: Carnes, Terry (RTIS) [email protected]
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
@agrarianhttps://github.com/agrarian What version of driver are you using?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-196979695
from msphpsql.
Hi @agrarian, I'm trying to understand your script. Why did you call sqlsrv_next_result()
before sqlsrv_fetch_array()
? Did you want to test for errors? If you drop sqlsrv_next_result()
then there shouldn't be any problem.
Hi @david-garcia-garcia do you still have function sequence error problem? I looked at the other related issue #50 and your repro script is gone.
from msphpsql.
I am getting this error:
[unixODBC][Driver Manager]Function sequence error
On both the 4.3.0 release of sqlsrv and 5.1.0 preview. I am running a different framework that is mostly mentioned here (CodeIgniter rather than Drupal). I am afraid I don't know where to look for the error. Is it an error in the framework, the driver, or unixOBDC? What is the bottom line as far as fixes or workarounds? Thank you.
from msphpsql.
Hello @rkevinburton
Function sequence error can be caused by various factors, so more info is required in addition to telling us you get this error. Therefore, please create a new issue by providing repro script(s), the platform and/or version of the SQL Server, etc. The more you provide the closer we can get to help answer your questions.
from msphpsql.
from msphpsql.
Hello @rkevinburton regrettably it's still a bit vague and we won't be able to reproduce the problem without a concrete repro scenario. For example, when you encountered this error were you doing a simple select, or update, or insert, with or without using stored procedure, transactions, etc.?
from msphpsql.
from msphpsql.
Thanks @rkevinburton. The problem likely lies in the file models/ion_auth_parent_model.php
, line 1222, as indicated in the error message. Looks like something went wrong when trying to delete a certain user? I'm guessing that the user with id 685 and group 1 doesn't exist.
Please bring this problem to your application developers. FYI, function sequence error often occurs when ODBC functions are called out of the order required. You can check this page for different scenarios that caused HY010 error
from msphpsql.
from msphpsql.
@rkevinburton we cannot investigate further unless we have clear steps to reproduce the problems. I'd happily help when you can provide a repro. In your example above, the error is clearly specific to your application and how the class(es) work(s) underneath.
from msphpsql.
Closing due to inactivity. Please reopen if necessary.
from msphpsql.
Related Issues (20)
- Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server HOT 1
- Memory leak in Microsoft ODBC Driver 17.10.5 for SQL Server HOT 4
- HY104 Invalid precision value when reusing prepared statement HOT 4
- SQLSTATE[01002] Adaptive Server connection failed (xxx.xx.xx.xxx) HOT 1
- Issue connecting to SQL server from Openshift HOT 1
- Unable to build version 5.12.0beta1 on Windows HOT 2
- New attribute for sql bigint and decimal/numeric types to php int and float types HOT 1
- Performance problem when using params on select query HOT 2
- Error on both ARM64 and AMD64 docker build HOT 1
- apt fails to install from pmc-geofence.trafficmanager.net: 403 Forbidden HOT 10
- Error requesting access token while Azure webapps (php) connect to Azure SQL server by UMI HOT 4
- Windows DLL available to download HOT 1
- unable to install in ubuntu 22.04 container HOT 1
- SQL server connection HOT 8
- When will there be support for installing Ubuntu 24.04? HOT 1
- Error OpenSSL Shutdown while in init - cURL - MSSQL HOT 6
- SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:0A0C0103:SSL routines::internal error] HOT 4
- sqlsrv_connect does not try to establish a connection when there is no instance specified HOT 13
- Missing release for Alpine: Alpine319-8.1.tar is no longer available at https://github.com/microsoft/msphpsql/releases/download/ HOT 2
- RedHat 9 - SQLSTATE[HYT00]: [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msphpsql.