Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 11, 2013 01:10PM

Hi,

here's what i'm trying to do:

I need to access a Oracle DB from PHP scripts, so i went to oracle.com and downloaded the Instant Client 11 and placed it on my C:\ directory (C:\instantclient_11_2).
Added it to the PATH Variable, restarted windows and installed WAMP. All works fine.
Then i enable the php_oci8_11g.dll extension and restart all services. The server goes green, all that worked before works now, however the oci extension does not show up on phpinfo() and any attempt to connect to the DB results in a undefined call error.

Checking the Apache error log i found this on WAMP startup:

[Mon Feb 11 10:59:19.381884 2013] [mpm_winnt:notice] [pid 4408:tid 396] AH00455: Apache/2.4.2 (Win64) PHP/5.4.3 configured -- resuming normal operations
[Mon Feb 11 10:59:19.381884 2013] [mpm_winnt:notice] [pid 4408:tid 396] AH00456: Server built: May 13 2012 19:54:49
[Mon Feb 11 10:59:19.381884 2013] [core:notice] [pid 4408:tid 396] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.2\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.2'
[Mon Feb 11 10:59:19.383885 2013] [mpm_winnt:notice] [pid 4408:tid 396] AH00418: Parent: Created child process 2352
PHP Warning: PHP Startup: in Unknown on line 0
[Mon Feb 11 10:59:19.893241 2013] [mpm_winnt:notice] [pid 2352:tid 288] AH00354: Child: Starting 64 worker threads.

The php _SERVER['PATH'] variable being loaded:

C:/Program Files/Java/jdk1.7.0_07/bin;C:\ORANT\bin;C:\ORA9\bin;C:\Program Files (x86)\Oracle\jre\1.3.1\bin;C:\Program Files (x86)\Oracle\jre\1.1.8\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Windows Live\Shared; C:\Program Files\Java\jdk1.7.0_07\bin; C:\wamp\bin\php\php5.4.3; C:\instantclient_11_2;

Any tips on what would be the problem?

Thanks,
Bruno Guarienti de Oliveira



Edited 1 time(s). Last edit at 02/11/2013 01:12PM by guarienti.

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: RiggsFolly (---.as13285.net)
Date: February 11, 2013 03:41PM

Is this any help

[www.oracle.com]

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 11, 2013 03:44PM

Yea, I followed those steps but still, I was unable to successfully enable the oci8 extension.

I'll give it another go!

Thanks for the reply!

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: stevenmartin99 (Moderator)
Date: February 11, 2013 04:18PM

Those instructions seem to be for php nts.


Tey Left click wamp icon> php> extensions> tick php_mbstring

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 11, 2013 04:27PM

php_mbstring was already ticked.

The amount of information PHP errors output is frustrating:

PHP Warning: PHP Startup: in Unknown on line 0

Maybe there's an option to output more error data?

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: stevenmartin99 (Moderator)
Date: February 11, 2013 04:31PM

It's nothing to do with phpc. It's the bad design of the extensions.

Usually it means another extension is needed to be loaded before that
Left click wamp > php> php.ini


Move mbstring up to the top and move oci to the bottom

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 11, 2013 04:47PM

Ok,

I've managed to make it work. I changed the order in the php.ini and it didn't work.
So I reverted the changes. I thought it could be a clash with different ORACLE libs, so i copied the necessary library files to the apache bin directory and it didnt work also...then I changed the order once more to what Steven suggested and OCI8 showed up as enabled on the phpinfo()!

Thanks for help!

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 12, 2013 11:24AM

Hi again!

After i got the OCI8 enabled i did some testing and at the fist attempt to connect to the database, apache hangs and restarts automatically:

[Tue Feb 12 08:22:11.371588 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00455: Apache/2.4.2 (Win64) PHP/5.4.3 configured -- resuming normal operations
[Tue Feb 12 08:22:11.371588 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00456: Server built: May 13 2012 19:54:49
[Tue Feb 12 08:22:11.371588 2013] [core:notice] [pid 3548:tid 268] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.2\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.2'
[Tue Feb 12 08:22:11.373588 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00418: Parent: Created child process 1648
[Tue Feb 12 08:22:11.906641 2013] [mpm_winnt:notice] [pid 1648:tid 292] AH00354: Child: Starting 64 worker threads.
[Tue Feb 12 08:22:34.620913 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00428: Parent: child process exited with status 255 -- Restarting.
[Tue Feb 12 08:22:34.673918 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00455: Apache/2.4.2 (Win64) PHP/5.4.3 configured -- resuming normal operations
[Tue Feb 12 08:22:34.673918 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00456: Server built: May 13 2012 19:54:49
[Tue Feb 12 08:22:34.673918 2013] [core:notice] [pid 3548:tid 268] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.2\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.2'
[Tue Feb 12 08:22:34.674918 2013] [mpm_winnt:notice] [pid 3548:tid 268] AH00418: Parent: Created child process 2360
[Tue Feb 12 08:22:35.185969 2013] [mpm_winnt:notice] [pid 2360:tid 292] AH00354: Child: Starting 64 worker threads.

Any thoughts?

Options: ReplyQuote
Re: Enabling OCI8 extension
Posted by: guarienti (---.175.44.152.static.gvt.net.br)
Date: February 12, 2013 12:10PM

Reading some other posts with the same error, i saw that Steven suggested using the 32bit version, and that solved it.

Thanks!

Options: ReplyQuote


Sorry, only registered users may post in this forum.