Trouble Connecting Digital Ocean to Laravel Application - laravel

I am having trouble connecting my laravel project to digital ocean. I am using ubuntu LAMP 16.04 to connect my project but i am getting a error telling me that says the ext-curl is missing but i already installed ext-curl by running
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
I know the problem has something to do with stripe but not sure of a soultion .
root#lamp-512mb-nyc3-01:/var/www/pengiun# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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
- The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
Problem 2
- Installation request for stripe/stripe-php v5.6.0 -> satisfiable by stripe/stripe-php[v5.6.0].
- stripe/stripe-php v5.6.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-apcu.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Install php curl extension using the below code. Composer is only a dependency manager for PHP. For more information on composer, visit https://getcomposer.org/doc/00-intro.md
sudo apt-get install php7.0-curl

Related

Composer install fail Digitalocean web hosting

What I did:
SSH Setuped
Php7.2 installed
apache2 installed
Pull Files from GitLab
When I run this apt install Composer
root#sewa:~/sewa# apt install composer
Reading package lists... Done
Building dependency tree
Reading state information... Done
composer is already the newest version (1.6.3-1).
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
but I can't install composer when I run composer install there is coming error message like this
root#sewa:~/sewa# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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
- Installation request for dompdf/dompdf v0.8.5 -> satisfiable by dompdf/dompdf[v0.8.5].
- dompdf/dompdf v0.8.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
- Installation request for laravel/framework v6.18.2 -> satisfiable by laravel/framework[v6.18.2].
- laravel/framework v6.18.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for league/commonmark 1.3.1 -> satisfiable by league/commonmark[1.3.1].
- league/commonmark 1.3.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 4
- Installation request for tijsverkoyen/css-to-inline-styles 2.2.2 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.2].
- tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 5
- Installation request for facade/ignition 1.16.1 -> satisfiable by facade/ignition[1.16.1].
- facade/ignition 1.16.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 6
- Installation request for phar-io/manifest 1.0.3 -> satisfiable by phar-io/manifest[1.0.3].
- phar-io/manifest 1.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 7
- Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].
- phpunit/php-code-coverage 7.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 8
- Installation request for phpunit/phpunit 8.5.2 -> satisfiable by phpunit/phpunit[8.5.2].
- phpunit/phpunit 8.5.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 9
- Installation request for scrivo/highlight.php v9.18.1.1 -> satisfiable by scrivo/highlight.php[v9.18.1.1].
- scrivo/highlight.php v9.18.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 10
- Installation request for theseer/tokenizer 1.1.3 -> satisfiable by theseer/tokenizer[1.1.3].
- theseer/tokenizer 1.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 11
- dompdf/dompdf v0.8.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- barryvdh/laravel-dompdf v0.8.6 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.5].
- Installation request for barryvdh/laravel-dompdf v0.8.6 -> satisfiable by barryvdh/laravel-dompdf[v0.8.6].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/20-apcu.ini
- /etc/php/7.2/cli/conf.d/20-apcu_bc.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gd.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-mysqli.ini
- /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
What I want to do solve this error
install the following php extensions -
php7.2-mbstring
php7.2-dom
Run the following command to install them -
sudo apt install php7.2-mbstring php7.2-dom
then restart the apache -
sudo systemctl reload apache2

Requirements could not be resolved

I am on Linux Ubuntu and I have a Symfony 4 project and I did not succeed to make that functions. After updating my OS, I have a problem. When I launch for this project:
composer install
I got this message:
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
- Installation request for nexylan/slack v2.0.0 -> satisfiable by nexylan/slack[v2.0.0].
- nexylan/slack v2.0.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for symfony/framework-bundle v4.0.14 -> satisfiable by symfony/framework-bundle[v4.0.14].
- symfony/framework-bundle v4.0.14 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 3
- Installation request for symfony/debug-bundle v4.0.4 -> satisfiable by symfony/debug-bundle[v4.0.4].
- symfony/debug-bundle v4.0.4 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 4
- symfony/framework-bundle v4.0.14 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- symfony/maker-bundle v1.4.0 requires symfony/framework-bundle ^3.4|^4.0 -> satisfiable by symfony/framework-bundle[v4.0.14].
- Installation request for symfony/maker-bundle v1.4.0 -> satisfiable by symfony/maker-bundle[v1.4.0].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/20-apcu.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-imagick.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
- /etc/php/7.4/cli/conf.d/20-xdebug.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Can you help me to solve this problem?
Finally, it was very simple. I just installed the packages php7.4-xml and php7.4-mbstring:
sudo apt-get install php7.4-xml and sudo apt-get install php7.4-mbstring

How to fix issue for install laravel 5.6?

I upgrade PHP 7.0 to 7.1 in ubuntu 16.04.
I need install laravel 5.6, but show this error:
But after run composer create-project --prefer-dist laravel/laravel blog in terminal show this error:
Installing laravel/laravel (v5.6.0)
- Installing laravel/laravel (v5.6.0): Loading from cache
Created project in orouji6
> #php -r "file_exists('.env') || copy('.env.example', '.env');"
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
- phpunit/phpunit 7.1.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 7.0.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 7.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 7.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/phpunit ~7.0 -> satisfiable by phpunit/phpunit[7.0.0, 7.0.1, 7.0.x-dev, 7.1.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.1/cli/php.ini
- /etc/php/7.1/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.1/cli/conf.d/10-opcache.ini
- /etc/php/7.1/cli/conf.d/10-pdo.ini
- /etc/php/7.1/cli/conf.d/20-calendar.ini
- /etc/php/7.1/cli/conf.d/20-ctype.ini
- /etc/php/7.1/cli/conf.d/20-exif.ini
- /etc/php/7.1/cli/conf.d/20-fileinfo.ini
- /etc/php/7.1/cli/conf.d/20-ftp.ini
- /etc/php/7.1/cli/conf.d/20-gettext.ini
- /etc/php/7.1/cli/conf.d/20-iconv.ini
- /etc/php/7.1/cli/conf.d/20-json.ini
- /etc/php/7.1/cli/conf.d/20-mbstring.ini
- /etc/php/7.1/cli/conf.d/20-mysqli.ini
- /etc/php/7.1/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.1/cli/conf.d/20-phar.ini
- /etc/php/7.1/cli/conf.d/20-posix.ini
- /etc/php/7.1/cli/conf.d/20-readline.ini
- /etc/php/7.1/cli/conf.d/20-shmop.ini
- /etc/php/7.1/cli/conf.d/20-sockets.ini
- /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.1/cli/conf.d/20-sysvsem.ini
- /etc/php/7.1/cli/conf.d/20-sysvshm.ini
- /etc/php/7.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
How to fix this problem?
Thanks
You need to install php dom extension.
sudo apt-get install php7.1-xml
You are missing the dom PHP extension. You need to install that to be able to use phpunit version 7 and above (which Laravel 5.6 requires in development environment).
If you're using Debian or Ubuntu, you can install it with apt install php7.1-xml.

Laravel installation errors on Ubuntu 16.04

Followed documentation on laravel.com. Installed Vagrant 2.0.1 first. Then installed Virtualbox 5.2.2, Homestead and Composer. After typing
composer global require "laravel/installer"
I get this:
Changed current directory to /home/ml/.config/composer
Using version ^1.5 for laravel/installer
./composer.json has been created
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
- Installation request for laravel/installer ^1.5 -> satisfiable by laravel/installer[v1.5.0].
- laravel/installer v1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, deleting ./composer.json.
Install the ext-zip extension.
apt-get install php7.1-zip
Then just restart PHP and test.
sudo service php7.1 restart
If you do not use PHP version 7.1, change the version value.

PHP7 : install ext-dom issue

I'm running laravel 5.4 on Ubuntu 16.04 server with PHP7. trying to install cviebrock/eloquent-sluggable package throw some error:
pish#let:/home/sherk/ftp/www$ sudo composer require cviebrock/eloquent-sluggable
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^4.2 for cviebrock/eloquent-sluggable
./composer.json has been updated
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
- phpunit/php-code-coverage 4.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/php-code-coverage (installed at 4.0.7) -> satisfiable by phpunit/php-code-coverage[4.0.7].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.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.
I have no problem installing this package on local version of the app .
First of all, read the warning! It says do not run composer as root!
Secondly, you're probably using Xammp on your local which has the required php libraries as default.
But in your server you're missing ext-dom. php-xml has all the related packages you need. So, you can simply install it by running:
sudo apt-get update
sudo apt install php-xml
Most likely you are missing mbstring too. If you get the error, install this package as well with:
sudo apt-get install php-mbstring
Then run:
composer update
composer require cviebrock/eloquent-sluggable
sudo apt install php-xml will work but the thing is it will download the plugin for the latest PHP version.
If your PHP version is not the latest, then you can add version in it:
# PHP 7.1
sudo apt install php7.1-xml
# PHP 7.2:
sudo apt install php7.2-xml
# PHP 7.3
sudo apt install php7.3-xml
# PHP 7.4
sudo apt install php7.4-xml
# PHP 8
sudo apt install php-xml
For CentOS, RHEL, Fedora:
$ yum search php-xml
============================================================================================================ N/S matched: php-xml ============================================================================================================
php-xml.x86_64 : A module for PHP applications which use XML
php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php-xmlseclibs.noarch : PHP library for XML Security
php54-php-xml.x86_64 : A module for PHP applications which use XML
php54-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php55-php-xml.x86_64 : A module for PHP applications which use XML
php55-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php56-php-xml.x86_64 : A module for PHP applications which use XML
php56-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php70-php-xml.x86_64 : A module for PHP applications which use XML
php70-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php71-php-xml.x86_64 : A module for PHP applications which use XML
php71-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php72-php-xml.x86_64 : A module for PHP applications which use XML
php72-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php73-php-xml.x86_64 : A module for PHP applications which use XML
php73-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
Then select the php-xml version matching your php version:
# php -v
PHP 7.2.11 (cli) (built: Oct 10 2018 10:00:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
# sudo yum install -y php72-php-xml.x86_64
you need just update your local composer file:
first you need remove "composer.lock" file from you app
then, exec in your bash:
composer update --ignore-platform-req=ext-curl
so try again
composer require cviebrock/eloquent-sluggable

Resources