Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeTDS doesn't seem to be returning the general error number any more, ... #446

Closed
wants to merge 1 commit into from

Conversation

chriskl
Copy link
Contributor

@chriskl chriskl commented Sep 13, 2013

This fixes the problem that error messages are no longer returned in pdo_dblib. It's because dberr is never set to SYBESMSG anymore?

…e, but the actual error number. This means that you get no useful error messages whatsoever. This change shows the message handler's string instead of the error string, whenever the severity > 0
@chriskl
Copy link
Contributor Author

chriskl commented Sep 16, 2013

Please note that this change has effectively already been made in unreleased FreeTDS source code:

http://gitorious.org/freetds/freetds/commit/bc22b2ef817fb5d102bd758111ff3634b39a1319

Note how the msgno is no longer relevant, it is hard-coded to the special message no. Once this FreeTDS version is released, PHP will be fixed, however we can put my pull request in in the meantime to solve the problem for all users of all versions of FreeTDS.

@nikic
Copy link
Member

nikic commented Sep 22, 2016

/cc @adambaratz Is this PR still relevant?

@adambaratz
Copy link
Contributor

Thanks for calling this out. It might be. I actually did a similar patch for my employer. It was on my todo list to see whether it should be cleaned up for broader use. This patch might be the cleaned up version, so I'll do some more testing and merge if needed.

@chriskl
Copy link
Contributor Author

chriskl commented Sep 23, 2016

I haven't tried this with updated PHP or FreeTDS for a while, so no idea if it's still needed sorry. Not having error messages really, really hurts though.

@adambaratz
Copy link
Contributor

The fix in question was from 2013. Hopefully people aren't running versions of FreeTDS that are so old. That said, there's no harm in including this change.

@php-pulls
Copy link

Comment on behalf of adambaratz at php.net:

Merged into PHP-7.0 and up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants