ayat#ayat-Win MINGW64 /c/xampp/htdocs/laravel $ composer
create-project --prefer-dist laravel/laravel cms Creating a
"laravel/laravel" project at "./cms" Installing laravel/laravel
(v7.12.0)
Installing laravel/laravel (v7.12.0): Loading from cache Created project in C:\xampp\htdocs\laravel\cms #php -r "file_exists('.env')
|| copy('.env.example', '.env');" Loading composer repositories with
package information Updating dependencies (including require-dev)
Package operations: 99 installs, 0 updates, 0 removals
Installing voku/portable-ascii (1.5.2): Loading from cache
Installing symfony/polyfill-ctype (v1.18.0): Loading from cache - Installing phpoption/phpoption (1.7.5): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download phpoption/phpoption from dist: The
"https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525"
file could not be downloaded: failed to open stream: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond.
Now trying to download from source
Related
it hangs on the loading packages, the error below.
$ composer create-project laravel/laravel jobs
Creating a "laravel/laravel" project at "./jobs"
Installing laravel/laravel (v9.2.0)
Installing laravel/laravel (v9.2.0): Extracting archive
Created project in C:\xampp\htdocs\jobs
#php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
After downloading the latest php and installing composer. then installed laravel using the command
composer global require laravel/installer
Changed current directory to C:/Users/User/AppData/Roaming/Composer
Using version ^4.2 for laravel/installer
./composer.json has been created
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 13 installs, 0 updates, 0 removals
- Locking laravel/installer (v4.2.8)
- Locking psr/container (1.1.1)
- Locking symfony/console (v5.3.6)
- Locking symfony/deprecation-contracts (v2.4.0)
- Locking symfony/polyfill-ctype (v1.23.0)
- Locking symfony/polyfill-intl-grapheme (v1.23.1)
- Locking symfony/polyfill-intl-normalizer (v1.23.0)
- Locking symfony/polyfill-mbstring (v1.23.1)
- Locking symfony/polyfill-php73 (v1.23.0)
- Locking symfony/polyfill-php80 (v1.23.1)
- Locking symfony/process (v5.3.4)
- Locking symfony/service-contracts (v2.4.0)
- Locking symfony/string (v5.3.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 13 installs, 0 updates, 0 removals
0 [>---------------------------] 0 [>---------------------------]
- Installing symfony/polyfill-php80 (v1.23.1): Extracting archive
- Installing symfony/process (v5.3.4): Extracting archive
- Installing symfony/polyfill-mbstring (v1.23.1): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.23.0): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.23.1): Extracting archive
- Installing symfony/polyfill-ctype (v1.23.0): Extracting archive
- Installing symfony/string (v5.3.3): Extracting archive
- Installing psr/container (1.1.1): Extracting archive
- Installing symfony/service-contracts (v2.4.0): Extracting archive
- Installing symfony/polyfill-php73 (v1.23.0): Extracting archive
- Installing symfony/deprecation-contracts (v2.4.0): Extracting archive
- Installing symfony/console (v5.3.6): Extracting archive
- Installing laravel/installer (v4.2.8): Extracting archive
0/13 [>---------------------------] 0%
10/13 [=====================>------] 76%
12/13 [=========================>--] 92%
13/13 [============================] 100%
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!`
After installation created a project laravel new example-app
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v8.6.1)
- Installing laravel/laravel (v8.6.1): Extracting archive
Created project in C:\test/example-app
> #php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v8.54.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
- league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- Root composer.json requires laravel/framework ^8.54 -> satisfiable by laravel/framework[v8.54.0, v8.55.0, v8.56.0, 8.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php7\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Then I performed cd example-app и php artisan serve. После выполнения php artisan serve gives an error message :
PHP Warning: require(C:\test\example-app/vendor/autoload.php): Failed to open stream: No such file or directory in C:\test\example-app\artisan on line 18
PHP Fatal error: Uncaught Error: Failed opening required 'C:\test\example-app/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\test\example-app\artisan:18
Stack trace:
#0 {main}
thrown in C:\test\example-app\artisan on line 18
After walking through the forums, I realized that there was not enough folder vendor in project
Project with files
After adding the vendor folder to the project using the command composer dump-autoload.The folder was added but after running the command composer dump-autoload a new error popped up :
Generating optimized autoload files
Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script
> #php artisan package:discover --ansi
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\test\example-app\bootstrap\app.php:14
Stack trace:
#0 C:\test\example-app\artisan(20): require_once()
#1 {main}
thrown in C:\test\example-app\bootstrap\app.php on line 14
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Then I tried to execute the command php artisan serve .Throws this error :
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\test\example-app\bootstrap\app.php:14
Stack trace:
#0 C:\test\example-app\artisan(20): require_once()
#1 {main}
thrown in C:\test\example-app\bootstrap\app.php on line 14
Then, walking around the forums, I just did not run to fix this problem I tried:
Composer update,
Composer install,
composer update --no-scripts
composer dump-autoload
composer install --no-scripts
I also tried this :
php artisan clear-compiled
composer dump-autoload
And tried to delete the vendor folder.
And so I tried it, though it says that there is no such file:
composer update --no-scripts
cd bootstrap/cache/->rm -rf *.php
composer dump-autoload
Nothing helped . I do not know what to do. And how to solve this problem.
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 am trying to install Laravel/Dusk on a laravel 5.4 application.
The command that I am running is, according to the documentation: https://laravel.com/docs/5.4/dusk
composer require laravel/dusk
The output in terminal:
Using version ^1.0 for laravel/dusk
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing facebook/webdriver (1.3.0)
Loading from cache
- Installing laravel/dusk (v1.0.10)
Downloading: 100%
Killed
That Killed is what's bothering. So, the package is being added to my composer.json file but no files can be found in vendor/laravel/dusk
I am trying to install this on my webhost and not on my local environment.
Any ideas?
The error is due to your machine on the host running out of memory, like described on this thread: https://github.com/composer/composer/issues/1815
So you may have to increase the performance on your account to be able to run more composer commands from your webhost.
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.