TLTR:
In CurlFactory.php line 200:
cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/
libcurl-errors.html)
I’m new in using Laravel and I’m trying different approaches.
One of the is to following the Laracast lessons on https://laracasts.com/series/laravel-6-from-scratch .
There’s a problem though. My wish is to install Laravel globally and I’m doing through Composer.
My php version is 7.3.11, mysql 8.0.18, I installed them through homebrew (last version) and only then I tried to install laravel through composer.
I downloaded composer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
And then I installed it globally because I moved the composer.phar file
mv composer.phar /usr/local/bin/composer
Last thing, I installed laravel globally
composer global require laravel/installer
and then I added a path to the /etc/paths files through vim
/Users/myselfuser/.composer/vendor/bin
sudo vim /etc/paths
and I did everything through my terminal.
Everything seems to work but the problem is that, if I tried to create a new project, I receive the error at the very beginning (cURL error 52), but I tried to find something regarding the problem and I didn’t find anything about this error.
To summirize, I’m able to create a project with:
composer create-project --prefer-dist laravel/laravel my-laravel-project
but not with:
laravel new my-laravel-project
Does anyone have the same problem?
2
Answers
I solve same problem
I have running local server (php artisan serve)
“laravel new” finish success when I stop local server
If using Homebrew make sure to stop your services (brew services stop httpd) before creating the laravel project (laravel new my-laravel-project)