Stephanie Elvina
Stephanie Elvina

Reputation: 11

PHP OCI8 Unable to load. Not a valid win32 application

I tried so many times changed the php.ini into this :

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client

extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client

;extension=php_openssl.dll

;extension=php_pdo_firebird.dll

extension=php_pdo_mysql.dll

extension=php_pdo_oci.dll

;extension=php_pdo_odbc.dll

;extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

;extension=php_pdo_sqlite_external.dll

;extension=php_pgsql.dll

;extension=php_pspell.dll

;extension=php_shmop.dll

but when I restart the Apache in XAMPP , this show up as a warning :

PHP Startup : Unable to load dynamic library ‘C:\xampp\php\ext\php_oci8.dll’ - %1 is not a valid Win32 application.

PHP Startup : Unable to load dynamic library ‘C:\xampp\php\ext\php_oci8_11g.dll’ - %1 is not a valid Win32 application.

PHP Startup : Unable to load dynamic library ‘C:\xampp\php\ext\php_pdo_oci.dll’ - %1 is not a valid Win32 application.

i've checked and those are exist in my php\ext

For information i used "Windows Version: Windows 7 Home Basic SP1 64-bit" "XAMPP Version: 1.8.1" and "Control Panel Version: 3.1.0 3.1.0" and "[PHP: 5.4.7]" and I'm using OracleXE11.

Upvotes: 0

Views: 6793

Answers (2)

farisfath25
farisfath25

Reputation: 93

Firstful, let me ask you some questions:

  1. Have you set up Java in your machine? If yes, go to 2nd question. If not, set it up first.
  2. Have you checked that Java is working well in your machine? Proceed to next question if it is yes. Otherwise, look up the internet for some guides.

Ok then, let's get into the core:

  1. Make sure that you have instantclient for Oracle in your computer (I refer to this source: https://manjaro.site/how-to-install-oracle-instant-client-19-5-on-windows-10/ , since it did help me through the process) Note: regarding the architecture choice, whether 32-bit or 64-bit, it depends on the Oracle Database you are going to use, NOT about your machine's architecture
  2. Last but not least, make sure that the row containing ";extension=php_oci8.dll" in the 'php.ini' file inside "..\xampp\php" is without the semicolon character at front, which it should become just "extension=php_oci8.dll"
  3. Ah, and also, pay attention to the PHP version that's used in your XAMPP...

Upvotes: 0

Vitor Paiva
Vitor Paiva

Reputation: 56

He's complaining that it is not a valid Win32 application. Probably, you need to change your OracleXE11 to the 32 bit version.

Upvotes: 1

Related Questions