Cannot install laravel oci8 - laravel

the composer require yajra/laravel-oci8:^8 command is giving me the following error:
C:\Users\yƶ\PhpstormProjects\BRP>composer require yajra/laravel-oci8:^8
./composer.json has been updated
Running composer update yajra/laravel-oci8
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires yajra/laravel-oci8 8 -> satisfiable by yajra/laravel-oci8[v8.0.0].
- yajra/laravel-oci8 v8.0.0 requires ext-oci8 >=2.0.0 -> it is missing from your system. Install or enable PHP's oci8 extension.
To enable extensions, verify that they are enabled in your .ini files:
- C:\PHP74\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Windows 10
PHP 7.4.6
Laravel 8.26.1
PHP Storm 2020.2.3
I am not using XAMMP or WAMP
I hope someone can help me out. Thank you in advance.

You are missing the OCI8 PHP extension, So follow these steps:
From http://pecl.php.net/package/oci8 download exact version, for you must be php_oci8-2.2.0, unzip it and copy to PHP ext folder, for you its in "C:\php74\ext"
Un-Comment "extension=php_oci8_11g.dll" in php.ini and restart Apache or any other web server that you are using
Check php_info(), oci8 should be enabled.
Run composer require yajra/laravel-oci8:^8 command again.

download extensions with suitable php version in https://windows.php.net/downloads/pecl/releases/oci8/
extract and copy all the .dll files to /xampp/php/ext
download instant client oracle with suitable OS and PHP version in http://www.oracle.com/technetwork/topics/winsoft-085727.html
extract and copy all the dll files to /xampp/apache/bin/ and copy it to /xampp/php/
install https://github.com/yajra/laravel-oci8

Related

Phalcon - Composer install of Dev-Tools error: requested PHP extension -

composer install with file compose.json
{
"require-dev": {
"phalcon/devtools": "~3.4"
}
}
should install Phalcon Dev-Tools.
Actual Behavior
Instead, it breaks with error
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for phalcon/devtools ~3.4 -> satisfiable by phalcon/devtools[v3.4.0].
phalcon/devtools v3.4.0 requires ext-phalcon ~3.3 -> the requested PHP extension phalcon is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
/Applications/MAMP/bin/php/php7.2.1/conf/php.ini You can also run php --ini inside a terminal to see which files are used by PHP in CLI mode.
Details
MacOS 10.13.5,
MAMP 4, PHP 7.2.1
php_phalcon.so 3.4 is copied into the extension directory and inserted into php.ini from php-phalcon-mamp
proof:
php -m
phalcon
....
how to force update composer ignoring the dependencies?
I figured it out by running the below command.
composer update --ignore-platform-reqs
composer install --ignore-platform-reqs

Setup Laravel project on cPanel

I'm trying to set up a laravel project as a subdomain on cpanel but I'm getting parsing issues, and an error.
These are the steps I've done so far
zip the project and upload it to this directory public_html/encuestas
unzip and move contents to the directory above
get ssh access with PuTTY and cd into the directory
do this command in PuTTY composer install --ignore-platform-reqs
I've also done it all through the PuTTY, cloned the repository from bitbucket with the same results.
After the command I get this feedback
vc#un.net [~/public_html/encuestas]# composer install --ignore-platform-reqs
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Parse error: syntax error, unexpected '?' in /home/vc/public_html/encuestas/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500
And when I go to the subdomain encuestas.un.ac.cr this is the error I get
Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)
I'm not sure if this is relevant but I suspect the php versions are the problem, in cpanel I have set the php version of this domain to PHP 7.1 (ea-php71) and these errors still persist, however the PHP System Default is set as 5.6 (I don't know how to change it). This was the solution I found online for the parsing errors but this hasn't worked.
I'm completely lost as to what could be happening or how to fix it?
EDIT:
when doing composer update this is the result
vc#un.net [~/public_html/encuestas]# composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ^7.1.3 but your PHP version (5.6.40) does not satisfy that requirement.
Problem 2
- barryvdh/laravel-dompdf v0.8.5 requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- barryvdh/laravel-dompdf 0.8.x-dev requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- barryvdh/laravel-dompdf v0.8.5 requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- Installation request for barryvdh/laravel-dompdf ^0.8.5 -> satisfiable by barryvdh/laravel-dompdf[0.8.x-dev, v0.8.5].
On that cPanel subdomain make sure to set the php version to at least 7.1.3 that can be done in cpanel itself in MultiPHP Manager
After that you will get a list of your subdomains, select it and from the top right choose a php version that works with that package at least(7.1.3) in your case, Click Apply.
If you don't have that php version installed on your server then contact the Admin to activate or install it.
If that didn't work, for the subdomain, try to set that PHP version to the root domain.
If you have access to WHM you can install a new PHP version through the easyApache panel.
Sometimes you have to restart Apache server in order for the new php to work.

How to install composer - Missing openssl

I have read How to enable PHP's openssl extension to install Composer? and You must enable the openssl extension to download files via https
They both state that the php file needs to uncomment extension=php_openssl.dll from the php.ini files which live in both these folders:
C:\wamp64\bin\apache\apache2.4.17
C:\wamp64\bin\php\php7.0.0
C:\wamp64\bin\php\php5.6.16 ' I don't think I need to, but did it any way
I've done that, and then restarted the PC.
WAMP is running on my Windows 10 machine
The same error always shows when trying to install Composer
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
What do I need to do to install Composer?
Edit
From C:\PHP (the PHP folder) I started a command prompt and ran php -r "phpinfo();"
In the results, there is the following:
OpenSSL support => disabled (install ext/openssl)
I have followed http://php.net/manual/en/faq.installation.php#faq.installation.addtopath
You have multiple version of PHP installed:
C:\wamp64\bin\php\php7.0.0
C:\wamp64\bin\php\php5.6.16
C:\PHP
The PHP version, which you run on the CLI is based on your environment PATH variable. The first PHP path wins.
run php --ini on the CLI. It will show you which php.ini is included and also the path of PHP
edit this php.ini file and activate the extension=php_openssl.dll
then run php -m to check, if the extension is loaded
then run composer

Composer: The requested PHP extension ext-intl * is missing from your system

I am trying to use composer.json file. but, when I am trying to run command 'composer install' in my path/project/, I am getting an error:
I have already configured my wamp for 'extension=php_intl.dll' and copied all icu*.dll in 'D:\wamp\bin\apache\apache2.2.22\bin' from 'D:\wamp\bin\php\php5.3.13' and it's showing in phpinfo():
without copy icu*.dll also works and showing in phpinfo();
Kindly, let me know if I have intl install on my wamp and composer install on my pc then why I am getting this error. really, it is so annoying.
Here is my details:
OS: windows 7 (64)
PHP: 5.3.13
Apache:2.2.22
Composer: installed by executable file
Pear: installed (latest)
PHPUnit: installed (latest)
My composer.json is as below:
{
"name" : "sebastian/money",
"description" : "Value Object that represents a monetary value (using a currency's smallest unit)",
"keywords" : ["money"],
"homepage" : "http://www.github.com/sebastianbergmann/money",
"license" : "BSD-3-Clause",
"authors" : [{
"name" : "Sebastian Bergmann",
"email" : "sebastian#phpunit.de"
}
],
"require" : {
"php" : ">=5.3.3",
"ext-intl" : "*"
},
"require-dev" : {
"phpunit/phpunit" : "~4.0"
},
"autoload" : {
"classmap" : [
"src/"
]
},
"extra" : {
"branch-alias" : {
"dev-master" : "1.3.x-dev"
}
}
}
Let me know if any other details is required..
Any feedback/help would be highly appreciated.
I encountered this using it in Mac, resolved it by using --ignore-platform-reqs option.
composer install --ignore-platform-reqs
After installing with this method, if the package that defines the requirement attempts to use any functions from the specified PHP extension, it will fail irrevocably.
PHP uses a different php.ini for command line php than for the web/apache php. So you see the intl extension in phpinfo() in the browser, but if you run php -m in the command line you might see that the list of extensions there does not include intl.
You can check using php -i on top of the output it should tell you where the ini file is loaded from. Make sure you enable the intl extension in that ini file and you should be good to go.
For php.ini 5.6 version (check version using php -v)
;extension=php_intl.dll
; remove semicolon
extension=php_intl.dll
For php.ini 7.* version
;extension=intl
; remove semicolon
extension=intl
In linux (Debian Jessie for example):
apt-get install php7.0-intl
will make the job to you due will create a simbolic link to it.
To enable intl extension follow the instructions below.
You need enable extension by uncommenting the following line extension=php_intl.dll in the C:\xampp\php\php.ini file.
Once you uncomment the extension=php_intl.dll, then you must restart apache server using XAMPP control panel.
//about line 998
;extension=php_intl.dll
change as
extension=php_intl.dll
(Note: php.ini file mostly in the following directory C:\xampp\php)
Restart xampp
just remove them
"ext-intl" : "*"
from your composer.json file.
Because sometimes for some helper functions, the IDE complains that the extension is missing from the composer.json file. Immediately press Alt+Enter to add it to the composer. But that doesn't mean that composer will count them in. The composer will complain next time while doing some operations. So that, we should not blindly type Alt+Enter rather than installing them manually in composer by doing composer install <package-name>.
As I think you have entered it manually, you should remove it, then install it in proper procedure composer install <package-name>
Or else you can run composer update to count that added dependencies in.
If You have got this error while running composer install command,
don't worry.
Steps to be followed and requirements:
Step1: Go to server folder such as xampp(or) wampp etc.
Step2: open php folder inside that and go to ext folder.
Step3: If you find a file named as php_intl.dll no problem.
Just go to php.ini file and uncomment the line
From:
;extension=php_intl.dll
To:
extension=php_intl.dll
Step4: restart xampp, thats it
Note: If you don't find any of the file named as
php_intl.dll, then you need to upgrade the PHP version.
(with xampp server)open php.ini in ".\xampp\php"
change ;extension=intl to extension=intl
This is bit old question but I had faced same problem on linux base server while installing magento 2.
When I am firing composer update or composer install command from my magento root dir. Its was firing below error.
Problem 1
- The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
Problem 2
- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
Problem 3
- Installation request for pelago/emogrifier 0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
- pelago/emogrifier v0.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
...
Then, I searched for the available intl & intl extensions, using below commands.
yum list php*intl
yum install php-intl.x86_64
yum list php*mbstring
yum install php-mbstring.x86_64
And it fixed the issue.
In latest XAMPP version;
You need to find only intl(Line no 912)in php.ini file.
Change
;extension=intl
To
extension=intl
I have faced the same issue on my server. And it is mainly happened due to miss-match of php version between server version and your system version. I am using Nginx and checked on all my project configuration files, it uses php8.0 but on my terminal it shows php.8.1. Actually my application needs php8.0. The following steps resolved my issue.
To see all my running php versions
sudo update-alternatives --config php
It shows the following page
Selecting php8.0 for my application. Run the command to see Nginx scripts are ok
sudo nginx -t
Then reload the Nginx
sudo systemctl reload nginx
Finally go to your project directory and update or install your composer
composer update
It has been resolved my issue, I expect same will resolve yours.
In my case, I am using ubuntu, run this command, it will be solved if your system is also ubuntu.
sudo apt-get install php-intl

Install Laravel framework on WAMP

I have been trying to install Laravel framework on WAMP.
I been following the steps from http://laravel.com/
and Installing Laravel 4.1 in Windows 7 // Make .phar file globally available to windows command line
When i run the command
composer create-project laravel/laravel --prefer-dist , getting the error message
[RuntimeException]
You must enable the openssl extension to download files via https
But i have enabled openssl in php.ini by removing the comment sign.
Please help
If you are using WAMPServer here is the problem:
WAMPServer's PHP CLI ( Command Line Interface ) i.e. running php.exe from command line uses a different php.ini to the one used by PHP in Apache.
Edit \wamp\bin\php\php5.x.y\php.ini
Activate the extensions you require the PHP CLI to have access to in the usual way i.e. remove the comment ';' from the extension=php_xxxx.dll line.
Wamp uses 2 php.ini
first one that you changed from the Wamp panel and second one that located on Apache folder.
i think on the wamp/bin/apache/bin make sure to enable openssl on both and restart the Wamp.
This worked for me. Hope this helps you.
Install Laravel Framework in Windows *PHP version greater than
5.3.7 is required.
Download Laravel from: https://github.com/laravel/laravel/archive/master.zip.
Extract Laravel into the www folder for WAMP.
Download Composer from: https://getcomposer.org/Composer-Setup.exe
Enable openssl from all php.ini files
Install Composer into the same directory php.exe is located.
Click on WAMP icon->PHP->PHP Extensions and enable: php_openssl, php_curl, php_socket.
Click on wamp icon->Apache->Apache Modules and enable ssl_module
Open cmd.
Change into the directory where you extracted Laravel e.g: cd C:\wamp\www\laravel.
Type the command: composer install.
Installation completed.
Open httpd.conf file
Add these lines after Include "c:/wamp/alias/"*
Listen 8000
DocumentRoot c:/wamp/www/laravel/public
Open Browser and go to localhost:8000
You follow given Only 1 step and install laravel 5 and composer in your machine
[1]Paste this in cmd : composer create-project laravel/laravel
when you run above command it will automatically install composer and laravel
OPTIONAL:
if error your configuration does not allow connection to
http//packages.firegento.com in cmd follow this command :
composer config -g secure-http false

Resources