php_oci8.dll is "not a valid Win32 app" [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php_oci8.dll is "not a valid Win32 app" [SOLVED]

Postby markelliot114 » 27. January 2012 00:54

:?: I just downloaded Xampp for Windows 7. I have a 64 bit machine. I need to run PHP with Oracle. I uncomment the line in php.ini with php_oci8.dll. When Apache starts it complains that the DLL is not a valid Win32 application. I have also installed the latest Oracle drivers too. Can you please help?
markelliot114
 
Posts: 2
Joined: 27. January 2012 00:46
Operating System: Windows 7

Re: php_oci8.dll is "not a valid Win32 app"

Postby hackattack142 » 27. January 2012 02:40

First, I would suggest always looking at the requirements for any non-default php extensions if you have not already because the additional oracle library you need is dependent on the PHP version: http://www.php.net/manual/en/oci8.requirements.php

Next, I suspect that you are trying to mix a 64 bit oracle dll with the 32 bit Apache/PHP that is part of XAMPP. I do not want to sign up for an Oracle account to test that theory. If you have any SideBySide errors in your Windows Event Log (Start > Run > eventvwr) that is typically the cause.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: php_oci8.dll is "not a valid Win32 app"

Postby Sharley » 27. January 2012 04:09

As pointed out above make sure your Oracle is compatible with the 32 bit VC9 compiled Apache/PHP in 1.7.7.

Also would you please edit your profile to reflect that you are using a 64 bit Windows version as it is important for correct support - thanks. :)
viewtopic.php?f=16&t=48626


I did see a work around for your issue where the solution was to copy the oci.dll from your compatible Oracle installation into the C:\xampp\apache\bin and the C:\xampp\php folders.

In the much older 1.7.1 version this oci.dll was found in the php and the apache\bin folders of xampp.

I tried using the oci.dll found in the 1.7.1 version in the 1.7.7 version but as far as I can tell it was looking for the Oracle installation by giving an error:
The procedure entry point OCIPing could not be found in the dynamic link library oci.dll
which leads me to believe I would have to install Oracle and copy over the oci.dll found in Oracle to the apache\bin and the php folder in 1.7.7 (this may not be needed if Oracle made an entry in the Path of the System Environment Variables.

I also believe you may need to uncomment the
Code: Select all
;extension=php_pdo_oci.dll
file in the [PECL} section of the php.ini file as well as the one you have already uncommented - this is only a suggestion which was found in the Apache Lounge forum by a poster who was not sure because of no experience with Oracle.

BTW the php_oci8_11g.dll is included in the 1.7.7 version in the php\ext folder and only requires an entry to be created in the Dynamic Extensions section of the php.ini file if you need this dll, also you may need to comment out the older php_oci8.dll once again.

The above might be worth a try to see if it helps and please let us know back if it did so it may help others with a similar issue.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: php_oci8.dll is "not a valid Win32 app"

Postby markelliot114 » 27. January 2012 22:54

:P Thank you both!!! Yes, the Oracle Windows 64 bit drivers were incompatible with the PHP dll’s. I had to uninstall (de-install) the Oracle Windows driver. This was hard because the Oracle de-installer failed on me. I had to then follow the driver removal by hand instructions from Oracle. Next, I installed the Oracle Windows 7 32 bit Instant Client. This reinstalled with little pain. I uncommented the “extension-php_oci8.dll” line in the “C:\xampp\php\php.ini file”; ran a web page with the PHP “<?php phpinfo(); ?>” and I got the oci8 support window! This was a long time in coming and what a relief, thanks!
markelliot114
 
Posts: 2
Joined: 27. January 2012 00:46
Operating System: Windows 7

Re: php_oci8.dll is "not a valid Win32 app"

Postby Sharley » 27. January 2012 23:05

You're most welcome and thanks for the feedback. 8)

I will close this topic and mark it solved.

Please feel free to start a new topic if you have any more issues with XAMPP for Windows.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 113 guests