4

we face a big problem to connect oracle server in php What i done

  • Setp 1:

    Install Windows 7 32bit

  • Step 2 :

    install XAMPP 32 ( Includes: Apache 2.4.29, PHP 7.1.11, phpMyAdmin 4.7.4, OpenSSL 1.0.2, XAMPP Control Panel 3.2.2)

  • Step :

    Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications Download instantclient-basic-nt-12.2.0.1.0.zip and extract it into c drive with instantclient_12_2 name

  • Step 5:

    Set environment in path "c:\instantclient_12_2"

  • Step 6:

    Edit php.ini file and enable extension=php_oci8_12c.dll (By removing semicolon ) from front

  • Step 7 :

    Restart my apache server , after that when i check phpinfo() it not showing any oci8 module

Then i check my error log i see this

[30-Nov-2017 13:42:43 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_oci8_12c.dll' - The specified procedure could not be found.

Can any one help me how to resolve this issue ,

Thanks in advance , and sorry for my English.

2 Answers 2

6

On the Instant Client download page, the next line after the download link for instantclient-basic-nt-12.2.0.1.0.zip states:

The 12.2 Basic package requires the Microsoft Visual Studio 2013 Redistributable.

As you haven't listed that in what you've tried, installing it should be your next step.

You should also reboot to ensure that your changes to the environment PATH are applied system wide (e.g. to the Apache service).

Sign up to request clarification or add additional context in comments.

5 Comments

Thank you , You save my lot of time :)
I have done above-mentioned steps and also installed Redistributable but I have received the warning and oracle connection, not setup. $ php --ri oci8 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_ oci8_12c.dll' - The specified module could not be found. in Unknown on line 0
@WaqasMehmood Try a more comprehensive answer.
I have followed all 7 steps mentioned by @MdHasiburRahaman and also installed Microsoft visual studio Redistributable and php_oci8_12c.dll file placed inside the php\ext folder but still I am unable to connect with database and receiving these warning PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_oci8_12c.dll' - The specified module could not be found. in Unknown on line 0 and Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_oci8_12c.dll' - The specified module could not be found. in Unknown on line 0
I've also faced the issue while using PHP code sniffer using command line. I've tried many solutions but nothing was helpful. but today I realized that when I've installed the code sniffer at that time the PHP ( C:\xampp\php ) path in the system environment is different and now I'm running the PHP ( F:\xampp\php ) with different path. So I've changed the system environment variable path and now the error is resolved.
2

I've come with a solution.

copy oci.dll, oraociei12.dll, and oraons.dll to apache/bin folder and replace the existing one.

1 Comment

Thank you so much, this worked for me, really helped me out. How did you come up with this answer?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.