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

PDO::PARAM_INT is not working #445

Open
Malborito opened this issue Jan 4, 2022 · 1 comment
Open

PDO::PARAM_INT is not working #445

Malborito opened this issue Jan 4, 2022 · 1 comment

Comments

@Malborito
Copy link

During the Drupal 8 to 9 update proccess, server's php version 7.2 has been updated to 7.4

The stored procedures in mssql are not working anymore, after some workaround we've detected that fails only on the stored procedures with "\PDO::PARAM_INT" receiving the following error:

"PDOException: SQLSTATE[HY090]: Invalid string or buffer length: 0 [FreeTDS][SQL Server]Invalid string or buffer length (SQLExecute[0] at /builddir/build/BUILD/php-7.4.26/ext/pdo_odbc/odbc_stmt.c:259) in ...."

We've tested diferent versions of FreeTDS acording the guide https://www.freetds.org/userguide/ChoosingTdsProtocol.html
We've replaced every \PDO::PARAM_INT to \PDO::PARAM_STR

We think is not the correct way to solve the error, Is there any wellknown error or solution.

@fziglio
Copy link

fziglio commented Jan 4, 2022

You should try to enable ODBC loggings and see why the length is invalid. It's not dependent on TDS protocol version. Did you upgrade only PHP or also FreeTDS?

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

No branches or pull requests

2 participants