Skip to content

Stdlib: ext/oci8 — oci_connect()/oci_parse()/oci_execute() Oracle DB API missing (ext/oci8) #6441

Description

@PurHur

Category

stdlib

Problem

Bundled php-src ext/oci8 (Oracle OCI8) is absent. oci_connect(), oci_parse(), oci_execute(), oci_fetch_array(), and related procedural helpers return function_exists() === false in the VM.

Enterprise DB parity track — distinct from #3367 (PDO), #3434 (SQLite3), #6441 (this issue).

php-src reference

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
cat > /tmp/oci8_probe.php <<'"'"'PHPEOF'"'"'
<?php
foreach (["oci_connect","oci_parse","oci_execute","oci_fetch_array"] as $fn) {
    echo $fn, ": ", function_exists($fn) ? "yes" : "MISSING", "\n";
}
PHPEOF
php bin/vm.php /tmp/oci8_probe.php
'

Compare Zend (with oci8 enabled):

php -r 'var_export(function_exists("oci_connect"));'

Today: all four print MISSING.

Scope

Path Work
ext/oci8/Module.php (new) Register oci8 builtins + resource types
ext/oci8/*.php PHP implementations + optional thin OCI client ABI
lib/JIT/Builtin/ JIT stubs or VM-defer until ABI stable
Not runtime/*.c logic tables PHP-in-PHP first; C only for unavoidable OCI calls

Phase 0 may register symbols that throw catchable Error when Oracle client libs are absent — must not abort VM on function_exists().

Done when

  • function_exists('oci_connect') true when module loaded
  • oci_connect() without OCI runtime raises catchable error (not VM abort / LogicException)
  • test/compliance/cases/stdlib/oci8_connect.phpt@group oci8, skip when libclntsh unavailable
  • Capability matrix lists oci8 module functions
  • Document php-src file mapping in PR body

Strictness

php-src-strict for argument validation (Z_PARAM_STR, resource types) once wired.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web apps

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions