GithubHelp home page GithubHelp logo

Comments (33)

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

meet-bhagdev avatar meet-bhagdev commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

call to undefined function Drupal\Driver\Database\sqlsrv\wincache_ucache_get()

You need the Wincache PHP extension for the MSSQL driver to work.

http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.7-dev-5.4-nts-vc9-x86.exe/download

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.

http://cgit.drupalcode.org/sqlsrv/tree/drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php?id=28c5fef

(line 1601)

from msphpsql.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

https://www.drupal.org/project/sqlsrvhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.drupal.org%2fproject%2fsqlsrv&data=01%7c01%7clfsantos%40microsoft.com%7caed3e59f63794c02353b08d2a9657296%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=G9VWBWYBpYx6HtsGAo0dJBFtrDpCdqegOSBsoetFqOg%3d


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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

david-garcia-garcia avatar david-garcia-garcia commented on July 19, 2024

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.

Lfsantos avatar Lfsantos commented on July 19, 2024

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.

agrarian avatar agrarian commented on July 19, 2024

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.

meet-bhagdev avatar meet-bhagdev commented on July 19, 2024

@agrarian What version of driver are you using?

from msphpsql.

agrarian avatar agrarian commented on July 19, 2024

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.

yitam avatar yitam commented on July 19, 2024

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.

rkevinburton avatar rkevinburton commented on July 19, 2024

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.

yitam avatar yitam commented on July 19, 2024

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.

rkevinburton avatar rkevinburton commented on July 19, 2024

from msphpsql.

yitam avatar yitam commented on July 19, 2024

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.

rkevinburton avatar rkevinburton commented on July 19, 2024

from msphpsql.

yitam avatar yitam commented on July 19, 2024

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.

rkevinburton avatar rkevinburton commented on July 19, 2024

from msphpsql.

yitam avatar yitam commented on July 19, 2024

@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.

david-puglielli avatar david-puglielli commented on July 19, 2024

Closing due to inactivity. Please reopen if necessary.

from msphpsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.