I have composer installed and openSSL extension enable in PHP but I still get the error (I restarted wamp twice)
Afflicto#Afflicto-PC /cygdrive/e/wamp/www/wirezapp2
$ composer create-project laravel/laravel wirezapp --prefer-dist
Installing laravel/laravel (v4.0.5)
- Installing laravel/laravel (v4.0.5)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "http://nodeload.github.com/laravel/laravel/zip/v4.0.5" file could not
be downloaded: failed to open stream: Unable to find the socket transport "
ssl" - did you forget to enable it when you configured PHP?
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-
url="..."] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress]
[-- keep-vcs] [package] [directory] [version]
Figured it out:
The php.ini in wamp is different than that used by apache/wamp, so I had to enable the open ssl extension via php.ini found in wamp/bin/php/php5.4.3/php.ini
Related
I'm trying to install laravel 5.7 by using this command
> composer create-project --prefer-dist laravel/laravel new_project dev-develop
But it's reflecting following error, also i disabled antivirus and firewall.
Installing laravel/laravel (dev-develop
b0651d2467f1428eadc505e1b3b4f5678611927c)
- Installing laravel/laravel (dev-develop develop): Loading from cache Created project in new_project
#php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating
dependencies (including require-dev) Package operations: 71 installs,
0 updates, 0 removals
- Installing vlucas/phpdotenv (v2.5.1): Downloading (failed) Downloading (failed) Downloading (failed) Failed to download
vlucas/phpdotenv from dist: The
"https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e"
file could not be downloaded : SSL operation failed with code 1.
OpenSSL Error messages: error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto failed to open stream: operation failed
Now trying to download from source
- Installing vlucas/phpdotenv (v2.5.1): Cloning 8abb4f9aa8
[RuntimeException] Failed to clone
https://github.com/vlucas/phpdotenv.git via https,ssh protocols,
aborting.
- https,ssh://github.com/vlucas/phpdotenv.git
Cloning into 'D:\xamppro\htdocs\neologicx.com\new_project\vendor\vlucas\phpdotenv'...
fatal: I don't handle protocol 'https,ssh'
create-project [-s|--stability STABILITY] [--prefer-source]
[--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers]
[--no-scripts] [--no
-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
OpenSSL Installed
and enabled
Okay, my problem resolved by removing '%temp%' files from windows.
After that i got content-length mismatch problem resolved from this Composer Content-Length Mismatch
And then again i tried this "composer create-project laravel/laravel laravelproject1" it worked.
Thanks Alot everyone.
composer global require "laravel/installer"
--
laravel new myProject
Run these commands in order and you should be fine.
If you prefer to use the composer create project command, then run this:
composer create-project --prefer-dist laravel/laravel blog
try composer clear-cache then composer self-update
Please try this.
install laravel 5.7:
composer create-project laravel/laravel laravelproject1
I was installing laravel framework by composer in visual studio code.
composer create-project laravel/laravel ems
but it failed to install the laravel.
here is the message
$ composer create-project laravel/laravel ems
Installing laravel/laravel (v5.5.0)
- Installing laravel/laravel (v5.5.0): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel
/zipball/a6c68c24c9938beef0128c3288502b8fbdf8e93d" file could not be downloaded: failed to open stream: A connection at
tempt failed because the connected party did not properly respond after a period of time, or established connection fai
led because connected host has failed to respond.
Now trying to download from source
- Installing laravel/laravel (v5.5.0): Cloning a6c68c24c9 from cache
[RuntimeException]
Failed to clone https://github.com/laravel/laravel.git via https, ssh protocols, aborting.
- https://github.com/laravel/laravel.git
Cloning into 'C:\xampp\htdocs\ems'...
fatal: unable to access 'https://github.com/laravel/laravel.git/': Failed to connect to github.com port 443: Tim
ed out
- git#github.com:laravel/laravel.git
Cloning into 'C:\xampp\htdocs\ems'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-
vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
I think you miss something "--prefer-dist"
composer create-project --prefer-dist laravel/laravel projectName
look at the documentation https://laravel.com/docs/5.5
On running the command:
composer create-project --prefer-dist laravel/laravel blog
I am getting these errors -
Your version of PHP, 5.4.12, is affected by CVE-2013-6420 and cannot safely perform
certificate validation, we strongly suggest you upgrade.
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
create-project [-s|--stability STABILITY] [--prefer-source]
[--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-plugins]
[--no-custom-installers] [--no-scripts] [--noprogress] [--keep-vcs]
[--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>][<version>]
Can anyone please tell me what may be the problem. I am using a proxy network. In environment variable I have set both http_proxy & https_proxy.
For laravel 5.2 minimum version of php required is 5.5.9
So you have to upgrade your php version.
Also you need to have only http_proxy as system variable if you are using proxy network, not the https_proxy variable.
I was having a bit of trouble getting PHPStorm to work with laravel/composer.
Upon opening PHPStorm, I created a new Composer Project: http://puu.sh/e4y1H/6fb97cf976.png
After which, I filled in necessary the details: http://puu.sh/e4y6Z/55bc60e7fc.png
After continuing, I run into the following error:
php /Users/mdobrenko/Sites/test/composer.phar create-project laravel/laravel
/Users/mdobrenko/Sites/test/composer -n --no-progress
Installing laravel/laravel (v4.2.11)
- Installing laravel/laravel (v4.2.11)
Loading from cache
Created project in /Users/mdobrenko/Sites/test/composer
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.5.8)
Loading from cache
- Installing symfony/security-core (v2.5.8)
Loading from cache
- Installing symfony/routing (v2.5.8)
Loading from cache
- Installing symfony/process (v2.5.8)
Loading from cache
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/debug (v2.5.8)
Downloading: connection... Downloading: 0% Downloading: 10% Downloading: 35% Downloading: 45% Downloading: 70% Downloading: 80% Downloading: 90% Downloading: 100%
- Installing symfony/http-foundation (v2.5.8)
[ErrorException]
touch(): Utime failed: Permission denied
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]
The 'Sites' directory that I store my development projects in, which is where this project lives, has the following permissions set:
drwxrwxrwx 11 mdobrenko staff 374 Jan 4 13:40 Sites
I noticed that most of my php artisan commands require the use of 'sudo'. Creating a new laravel project via the command:
composer create-project laravel/laravel your-project-name --prefer-dist
I have a feeling permissions may be the issue, but I am unsure of how to fix this. Any help would be appreciated!
This link should help. Try clearing the composer cache, re-installing composer, Chown the Sites folder to the same user as the apache server uses
To clear the composer cache, open a terminal and cd into your project folder: sudo composer clear-cache (sudo may not be required here)
Changing permissions: chown -R $(whoami): . this sets the owner of all files and sudirectories to the current user. giving you permission to access the files.
I cloned a git project, then run composer update command, I got this error message on composer:
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
[UnexpectedValueException]
'E:\Sites\myapp-api\vendor/symfony/symfony/268ac81f41a8a73a56ef570d9e7980
27.4' is not a zip archive.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
[--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [
-o|--optimize-autoloader] [packages1] ... [packagesN]
I tried to delete composer.lock and run composer update command again, still return the same error.
I also try to run composer update symfony/symfony, and with --prefer-dist but still return the same error message 'is not a zip archive'.
How to solve this problem?
I try and try again, and now there are 3 ites of downloading symfony/symfony
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
[UnexpectedValueException]
'E:\Sites\trainme-api\vendor/symfony/symfony/698bb2e6e680e6c886eb5c70f5d93e
97.4' is not a zip archive.
I had silimar issue. Clearing composer cache helped.
Look here: https://github.com/composer/composer/issues/1242
If You are using linux composer cache should be in: ~/.composer/
You can clear it with backup with this command:
mv ~/.composer/cache ~/.composer/cache.bak
Update
Check cache-dir param in your composer.json
http://getcomposer.org/doc/04-schema.md#config
cache-dir: Defaults to $home/cache on unix systems and C:\Users\\AppData\Local\Composer on Windows. Stores all the caches used by composer. See also COMPOSER_HOME.
UPDATE:
You can find cache dir with command (thanks to #Permana):
php composer.phar config cache-dir