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

Undefined constant "Yajra\Pdo\Oci8\SQLT_BOL" #131

Open
mmn6d6d6e opened this issue Jul 13, 2023 · 0 comments
Open

Undefined constant "Yajra\Pdo\Oci8\SQLT_BOL" #131

mmn6d6d6e opened this issue Jul 13, 2023 · 0 comments

Comments

@mmn6d6d6e
Copy link

mmn6d6d6e commented Jul 13, 2023

Summary of problem or feature request

Encountering error Undefined constant "Yajra\Pdo\Oci8\SQLT_BOL" when executing stored procedure.
To be more specific, when binding OUT parameter.

This works on my local machine, but not on the the another machine.
The only difference I noticed between both machine are the OS version and php-oci8.
Can't confirm yet.

Recompiled oci8 on the other machine using instantclient 12.2 and it works fine now.
So maybe this require oci8 with at least instantclient 12.2?

Code snippet of problem

...
$stmt = DB::getPdo()->prepare($sqlQuery);
...
$stmt->bindParam('kd_detil', $kd_detil, 20, SQLT_INT);
// ^ this trigger the error
...
  Undefined constant "Yajra\Pdo\Oci8\SQLT_BOL"

  at vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8/Statement.php:351
    347▕ 
    348▕                 $this->blobObjects[$parameter] = &$variable;
    349▕                 break;
    350▕ 
  ➜ 351▕             case SQLT_BOL:
    352▕                 $ociType = SQLT_BOL;
    353▕                 break;
    354▕ 
    355▕             default:

  1   app/Models/DetailKontrak.php:259
      Yajra\Pdo\Oci8\Statement::bindParam()

      +1 vendor frames 
  3   app/Console/Commands/SyncBkdCommand.php:227
      Illuminate\Database\Eloquent\Model::save()

System details (My PC, works)

  • Operating System Ubuntu 22.04.2 LTS (WSL)
  • PHP Version 8.0.29
  • PDO-VIA-OCI8 Version v3.4.0
  • php-oci8 3.0.1 instantclient 19.16.0.0.0

System details (Other Machine, doesnt work)

  • Operating System Ubuntu Ubuntu 20.04.6 LTS
  • PHP Version 8.0.29
  • PDO-VIA-OCI8 Version v3.4.0
  • php-oci8 2.0.12 instantclient 11.2.0.4.0

System details (Other Machine, updated, works)

  • Operating System Ubuntu Ubuntu 20.04.6 LTS
  • PHP Version 8.0.29
  • PDO-VIA-OCI8 Version v3.4.0
  • php-oci8 3.0.1 instantclient 12.2.0.1.0
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

1 participant