Laravel OCI8 not installing - php

Summary of problem
I have oci8 installed for php 7.1.19
Running on Laravel Framework 5.6.3
//error i get when trying to install Yajra oci8 github for laravel
Your requirements could not be resolved to an installable set of packages.
Problem 1
yajra/laravel-oci8 v5.6.0 requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
yajra/laravel-oci8 5.6.x-dev requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
yajra/laravel-oci8 5.6.x-dev requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
Installation request for yajra/laravel-oci8 5.6.* -> satisfiable by yajra/laravel-oci8[5.6.x-dev, v5.6.0].
To enable extensions, verify that they are enabled in your .ini files:
C:\wamp\bin\php\php7.1.9\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
//
When i make a test.php in WAMP it works and no errors, but now i want it to work for laravel as well.
Code snippet
$conn = oci_connect('Name', 'Password', 'Localhost');
if ($conn) {
echo "connect succesfull";
}
\\
The command i run to install it in laravel is:
'composer require yajra/laravel-oci8:"5.6.*"'
I understand that this might not be the right command, soo i tried this:
'composer require yajra/laravel-oci8:"7.1.19"'
But that one doesnt exists
I am kinda stuck now. Anyone can help me?

# How to install OCI8 in windows
## Instantclient Version 12.2.0.1.0
##### Xampp
##### php 7.2.4
##### Windows 10
### Step 1
Download OCI8 2.1.8 - 7.2 Thread Safe (TS) x86
### Step 2
Extract the file to xampp\ext
### Step 3
Add code to file xampp\php.ini
extension=php_oci8.dll
### Step 4
Download the "Instant Client Package - Basic" for Windows from the OTN Instant Client page.
http://www.oracle.com/technetwork/topics/winsoft-085727.html
Because PHP is 32 bit, use the 32 bit version of Instant Client.
(http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html)
Instant Client Package - Basic Version 12.2.0.1.0
### Step 5
Extract the Instant Client folder to C:\instantclient_12_2
### Step 6
Edit the Windows PATH environment setting and add this path
C:\instantclient_12_2
### Step 7
Restart

Related

PHP does not recognize an oci8 extension

I'm using
PHP version 7.4
windows 10
Laravel 5.7
I'm trying to perform a composer install on the repository, but the following error appears:
Problem 1
- Root composer.json requires yajra/laravel-oci8 5.7.* -> satisfiable by yajra/laravel-oci8[v5.7.0, ..., 5.7.x-dev].
- yajra/laravel-oci8[v5.7.0, ..., 5.7.x-dev] require ext-oci8 >=2.0.0 -> it is missing from your system. Install or enable PHP's oci8 extension.
I tried to follow the step by step of this post: Cannot install laravel oci8
But it still didn't work.
PHP OCI8 on PECL supports PHP 7 (and older versions - see
PECL page to install on older PHP versions).
Try uninstalling OCI8. Check if you don't have multiple versions of PHP - the difference in path names makes me think you have them.

codeigniter 4, installation with composer problem

I'm new to Codeigniter and i want to ask why when i want to install CI 4 with composer it resulted
Problem 1
- codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2].
But i already uncommend the intl extension on php.ini (I'm using XAMPP)
I already tried to find answers but i can't find it. if you guys have opinion on what's going on please let me know. Thank youu
If you are using php version 5.6 or below
;extension=php_intl.dll Remove semicolon from the line in php.ini file
If php 7 or above
Remove semicolon from the line ;extension=intl in php.ini
Once you updated php.ini restart XAMPP/WAMP
CodeIgniter 4 requires PHP >= 7.2.
The composer.json file of CodeIgniter 4 contains a php>=7.2 require; so you should see the requirements are not satisfy as first problem. But the strange thing is you have extension=php_intl.dll; into your PHP configuration file: from PHP version 7.2 you should have extension=intl. So, please check your PHP version you have into your XAMPP.
Then check that you have C:\xampp\php into your Windows PATH (or the right php directory path in your system).
Try to launch your composer install; if it give the same error, try to create a file test.php into your webroot, containings
<?php phpinfo(); ?>
Open the test.php page on your local web server with the browser and search for Internationalization support. If you do not find this information, it means that extension is not active.
In this case, give a look if you have edit the right PHP.INI. See this question for the right setting of extension with XAMPP.
You could try to run composer with the flag --ignore-platform-reqs to force the instalation, but be aware to solve dependency to run your project.
(I use this flag to install when the server runs on docker with different specifications than host)

Dealing with "the requested PHP extension pdo_sqlite is missing from your system. " when running composer install

I'm having difficulty running composer install on Jenkins.
I have a Jenkins job that I need to run composer install for. I have installed php7.2 and composer. When I run the command, I get the following errors:
composer install
Problem 1
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- Installation request for teamtnt/tntsearch v1.3.2 -> satisfiable by teamtnt/tntsearch[v1.3.2].
So I install sqlite using the following command: sudo apt-get install php7.2-sqlite3
After this, I get the additional warning, and the error persists.
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite.so'
(tried: /usr/lib/php/20170718/pdo_sqlite.so (/usr/lib/php/20170718/pdo_sqlite.so:
undefined symbol: sqlite3_column_table_name), /usr/lib/php/20170718/pdo_sqlite.so.so
(/usr/lib/php/20170718/pdo_sqlite.so.so: cannot open shared object file:
No such file or directory)) in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- Installation request for teamtnt/tntsearch v1.3.2 -> satisfiable by teamtnt/tntsearch[v1.3.2].
When I ssh into the Jenkins box and run composer install from the workspace directory, everything runs as expected and the vendor directory is generated with no errors.
I have spent a lot of time looking at the answers to existing questions on StackOverflow.
I've purged everything that is not php7.2, and removed any previous versions of my machine.
I have also installed the php7.2-pdo_sqlite, and ensured that it is displayed in the php.ini file.
I've also tried completely removing php (and checked using php -v) and then reinstalled php7.2.
When I run php --ini I see /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini, and
/etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini displayed on the list.
I have also given READ permissions to /usr/lib/php/20170718/pdo_sqlite.so incase it was due to a permission error.
What else can I do to resolve the error above? - my goal is to be able to run composer install.
Workaround
If your build pipeline doesn't require sqlite to be installed, you can bypass the check for platform requirements with --ignore-platform-reqs, like so:
composer install --ignore-platform-reqs
From the documentation:
--ignore-platform-reqs: ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill
these. See also the platform config option.
If you have tests that assert sqlite functionality, this isn't a solution, unfortunately.

Laravel Composer require issue with Mac Sierra

I'm trying to include Laravel 5 Facade for Goutte in my application. However I am getting the following error:
Problem 1
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- Installation request for namshi/jose (locked at 5.0.2) -> satisfiable by namshi/jose[5.0.2].
I have searched online and it suggests installing a new version of PHP and try using that instead however I have installed php56 via homebrew and its still not working. When i run:
which php
it says the path is:
/usr/bin/php
However brew installed PHP to:
/usr/local/Cellar/php56/5.6.30_6/bin
I have updated my .bash_profile with the following line:
export PATH=$PATH:/usr/local/Cellar/php56/5.6.30_6/bin
However even after restarting the terminal which php still returns /usr/bin/php.
You can try to create a symlink for new php version this way :
sudo ln /usr/local/Cellar/php56/5.6.30_6/bin/php /usr/local/bin/php
Then run your composer command
php composer require weidner/goutte
or
php composer.phar require weidner/goutte
Hope this helps !

how to install mysql drivers for php7 on windows system

How to install MySQL drivers for php 7 on windows system?
Error: - Installation request for pear-pear.php.net/mdb2_driver_mysql 1.4.1 -> satisfiable by pear-pear.php.net/MDB2_Driver_mysql[1.4.1].
- pear-pear.php.net/MDB2_Driver_mysql 1.4.1 requires ext-mysql *
-> the requested PHP extension mysql is missing from your system.
Problem 2 - Installation request for pear-pear.php.net/validate_au 0.1.4 -> satisfiable by pear-pear.php.net/Validate_AU[0.1.4].
- pear-pear.php.net/Validate_AU 0.1.4 requires php >=4.2.0.0,<=6.0.0.0 -> your PHP version (7.1.4) does not satisfy that requirement
I guess you haven't enabled mysql in your XAMPP server yet. To do that:
At first close all running services of xampp. Now, go to your xampp folder. Then go to php folder and open the file named php.ini with any text editor. Now search for mysql in that file. You will find a line stating ;extension=php_mysqli.dll. The ; symbol describes it as a comment that means it is not enabled yet. Simply cut out that ; sign in front of that line which will now look like extension=php_mysqli.dll. Finally save the file and restart xampp.
PHP7 does not have the mysql_ database extension any more. Its dead Jim

Categories