Open lucaguelfi opened 1 year ago
if you use edgardmessias/yii2-informix how come it come into yii2 \yii\db\Command::queryInternal It suppose overrided by edgardmessias/yii2-informix I think, Or maybe extension pdo_informix has bug
try check this reference https://www.php.net/manual/en/ref.pdo-informix.php#ref.pdo-informix.features.cursors
PDO_INFORMIX supports scrollable cursors; however, they are not enabled by default. To enable scrollable cursor support, you must either set ENABLESCROLLABLECURSORS=1 in the corresponding ODBC connection settings in odbc.ini or pass the EnableScrollableCursors=1 clause in the DSN connection string.
The queryInternal of edgardmessias\yii2-informix\src\Command.php starts with this code:
if ($method !== '') {
return parent::queryInternal($method, $fetchMode);
}
With queryOne() the $fetchMode is "fetch" so it does not override.
What steps will reproduce the problem?
I installed pdo_informix and edgardmessias/yii2-informix library (ver. 1.1.1) in php 8.2. I execute a queryOne() on a simple query: select * from tablename
What is the expected result?
I expect to have a single row from table
What do you get instead?
I got an infite loop without any result. The browser keep loading forever
Additional info
If I comment the row $this->pdoStatement->closeCursor(); at tline 1195 in vendor/yiisoft/yii2/db/Command.php then everyting works fine.