Require ext-oci8 >=2.0 0 it is missing from your system install or enable phps oci8 extension
the Show
I am not using XAMMP or WAMP I hope someone can help me out. Thank you in advance.
bhucho 3,6123 gold badges15 silver badges29 bronze badges asked Feb 5, 2021 at 8:39
1 You are missing the OCI8 PHP extension, So follow these steps:
answered Feb 5, 2021 at 9:50
Pejman KheyriPejman Kheyri 2,9767 gold badges30 silver badges31 bronze badges 5 Summary of problem or feature requestI tried to run composer require yajra/laravel-oci8:"5.6.*" OR composer require yajra/laravel-oci8, it resulted the error on the title. Is that trying to say that I should use the 2.0.0 version of oci8 dll? The thing is there is no 2.0.0 version for Windows. >> https://pecl.php.net/package/oci8 I read so many tips on some sites, but none of it works. Code snippet of problemcomposer require yajra/laravel-oci8 System details
OCI8 is PHP’s library for talking to Oracle databases, but installing it on Ubuntu is not particularly simple. Here’s what I did, on Ubuntu 12.04. My instructions are based on these by Naveen S Nayak, plus some bits I had to figure out. Firstly, you’ll need a working Apache / PHP stack to add your Oracle stuff to. Once you’ve got that going, you need to download two ZIP files from Oracle, the Instant Client Package — Basic and the Instant Client Package — SDK. Download them here (http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html) for 64 bit Ubuntu, 32 bit is at http://www.oracle.com/technetwork/topics/linuxsoft-082809.html. Unzip the files in the basic package to /opt/oracle_instantclient. Next, unzip the SDK package and copy the sdk directory inside that to /opt/oracle_instantclient, so that it lives at /opt/oracle_instantclient/sdk. Note: Both the ZIP archives I downloaded contained a directory at their root called “instantclient_12_1”, with no other duplicate files. You could therefore just unzip both archives to the same location, then move the resulting directory to /opt and rename it “oracle_instantclient”. Next we need to create a symlink – cd /opt/oracle_instantclient sudo ln -s libclntsh.so.12.1 libclntsh.so Note: Check the file you’re linking to above exists — the version number might be different for you. Now we need to install some packages to allow us to build the PHP extension. sudo apt-get install php5-dev libaio-dev php-pear sudo pecl install oci8 The pecl install will ask you to tell it Oracle’s home directory, the answer you need to give is instantclient,/opt/oracle_instantclient You should then see a congratulatory message along the lines of “Build Process completed successfully”. Now we need to tell PHP about our new extension, like this sudo echo “extension=oci8.so” > /etc/php5/conf.d/oci8.ini Now we need to make sure that PHP apps know where to look for the extension, by adding an Apache environment variable (annoyingly, adding this as a system-wide environment variable didn’t work for me). You can add this to any of Apache’s various conf files, or to your virtualhost config, if that suits. I added the following to /etc/apache2/apache2.conf SetEnv LD_LIBRARY_PATH=”/opt/oracle_instantclient” Then I needed to set the permissions on that directory to allow Apache to access it. sudo chown -R root:root oracle_instantclient/ sudo chmod -R g+x oracle_instantclient/ And finally, restart Apache – sudo service apache2 restart Congratulations! You should now be able to use PHP’s oci_* functions. How do I install or enable PHP's OCI8 extension?The OCI8 extension can be added to an existing PHP installation by using the » PECL repository. When prompted, enter either the value of $ORACLE_HOME , or instantclient,/path/to/instant/client/lib . Make sure the php. ini directive extension_dir is set to the directory that oci8.so was installed in.
How to enable OCI8 in PHP windows?1 Answer. Download instantclient and place "C:\instantclient_11_2". Set environment variable for C:\instantclient_11_2.. Check your php version i.e. PHP Version 5.6.15.. Un-Comment "extension=php_oci8_11g.dll" in php.ini and restart apache.. check php_info(), oci8 should be enabled. Thats all.. How install OCI8 on Linux?How to install Oracle Client Instant (OCI8) on Linux. Download the latest Oracle Instant Client and SDK. ... . Extract the files. ... . Add in the ldconfig's config folder. ... . Install packages. ... . Install the OCI8 extension via PECL. ... . Load extension from php.ini. ... . Restart & check.. What is OCI8 PHP?PHP. Description. The OCI8 extension lets you access Oracle Database. Use 'pecl install oci8' to install for PHP 8.1.
|