Installed stack: Windows 7 64x / Vagrant / Oracle VM Box / Laravel Homestead.
Mapping works, laravel's site's works. But when I run command: "composer update" - I get error message:
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
P.S. I have done:
Disable windows defender
Turn off firewall
Run composer clear cache
Run composer diagnose - everything is ok
php.ini - zlib is turned on
there are no antivirus soft on my system
I've been having the same issue! What works for me so far is disabling XDebug on the CLI, which at least allows degraded mode to work.
To make it work, run this command when SSH'd into your Homestead box:
$ sudo phpdismod -s cli xdebug
Hope it helps!
Related
I installed Laravel Dusk for website testing. I tried every solution on Stackoverflow regarding this problem but nothing worked.
I need to run browser headless because I'm running tests on my Linux server.
Current version of chromedriver-linux is:
./vendor/laravel/dusk/bin/chromedriver-linux --v
ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430#{#429})
Current version of Chromium is:
chromium-browser --version --no-sandbox
Chromium 90.0.4430.93 snap
When I run Dusk I get error:
Operation timed out after 30001 milliseconds with 0 bytes received
Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","platformName":"linux","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"linux","chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox"]}}}
Is there any way to resolve this? I tried by adding arguments "--headless","--disable-gpu","--no-sandbox" but unfortunately it is not working.
friend!
I assume you are on Windows host with Homestead (Windows 10, Homestead 10 and Laravel 8). If not, I am not sure this answer will help. But this just helped me, literally, a few minutes ago, so I feel obliged.
Dusk appears not like Chromium and desires a full Chrome. So lets install it:
cd ~
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
This will download the latest stable google chrome and install it.
Do make sure that you got your project's vendor/laravel/dusk/bin/ folder is executable, as the docs suggest. So, in the root of your project:
chmod -R 0755 vendor/laravel/dusk/bin/
Make sure you got the latest chromium-driver installed:
php artisan dusk:chrome-driver --detect
3.1. If it will give you hard time (cannot rename, cannot move files, yada-yada) - it is probably because you have the driver already running, so exit Homestead and just
vagrant reload
return back to homestead and repeat 3 above.
Make sure you are able to curl your APP_URL. Let's say it is laravel.app:
curl http://laravel.app
If not, check /etc/hosts, you expect to see something like 127.0.0.1 laravel.app - following our assumption about the URL. This is normally set by Homestead itself, when you provision a new site.
Voila.
php artisan dusk
was successful.
That fixed it for me.
I have spent exorbitant amount of time which could have been saved by a single line in docs "If you are running Homestead on Windows, make sure to install Google Chrome"
Happy coding!
I am currently learning PHP Laravel. I am in the process of setting up valet. However, I encountered a problem. Whenever I type (filename).dev, it shows the XAMPP main page instead of the Laravel initial project page. Can someone explain why this is happening?
The original answer can be found here.
Remove valet completely (some reason valet uninstall does nothing) so to get the latest version (v1.1.3 at the time)
Stop Apache: apachectl stop
Update Valet: composer global require laravel/valet
Install Valet: valet install
Restart Valet: valet restart
With some others, it might be a good option to try and simply turn-off/stop your locally running Apache, as this as others might find is only the issue that fixes it.
I faced the same issue as I was running Xampp and Valet at the same time on my Windows Machine, try turning off the xampp/apache and run the page again.
Steps to install Valet on Windows..
Install composer from https://getcomposer.org/download/
Then run composer global require cretueusebiu/valet-windows
Then run: "valet install"
Open your Laravel project directory in cmd (administrator mode)
Then run: "valet park"
Then run: "valet link"
Then run: "valet secure" (if you want your website to be secured by TLS)
In the control panel/network and sharing center choose the active connection and in its properties enter 127.0.0.1 in TCP/IPv4 IPv4 settings
In the control panel/network and sharing center choose the active connection and in its properties enter ::1 in TCP/IPv6 IPv6 settings
Then run: "valet start"
Enter the "projectname" followed by ".test" in the browser.
For example: if your project name is demolaravel, then run demolaravel.test in the browser
I run ubuntu 14.04 trusty. I installed virtual box and vagrant in order to be able to use laravel. I installed laravel homestead via git and I am trying to run the command 'vagrant up' but I get an error. Please what am I doing wrong?
I tried to add vagrant box with this command 'vagrant box add laravel/homestead' but I got the error below:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
Can you run vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead --insecure
Using the --insecure flag it does not validate SSL certificates so you should not have the SSL error
You may need to clean ~/.vagrant.d/tmp/ folder if you have some uncompleted transfer
You can also download the ssl certificate and directly use it to bypass the error
$ vagrant box add --cacert <certificate> box_name
I had the same error yesterday twice. I just removed the tmp folder in ~/.vagrant.d and ran again 'vagrant box add laravel/homestead'. I realized that when my laptop suspends due to non-activity, the command just fails, so what I did is disable the suspend after 30 min and activate 'Never Suspend' (that option depends obviously on your environment)
On Ubuntu 14 just right click the battery icon and choose Energy Options.
I am trying to install Laravel for first time. I installed it on my desktop with the following composer command
composer create-project laravel/laravel laravel-app
The command completed successfully without any error but with some messages like
symfony/var-dumper suggests installing ext-symfony_debug ()
symfony/translation suggests installing symfony/config ()
I now did chmod -R 777 larvel-app to make whole folder writable by everyone. I now started php server with following command
cd laravel-app
php artisan serve
and it gave following message
Laravel development server started on http://localhost:8000
When viewed from web browser in address http://localhost:8000, there is nothing, only blank page. When I browse this address, the server seems to quit.
I have following environment:
OSX Mavericks;
MAMP with php 5.4.10 and apache2;
following extensions in php.ini file
extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
;;;;;Following are added by me ;;;;no error when starting server
extension=openssl.so
extension=mbstring.so
When I run which php from command line, I get following.
/Applications/MAMP/bin/php/php5.4.10/bin/php
When I tried to run this in mamp ie localhost:8888, it gave 500 internal server error.
Please suggest me, where I might have made mistake.
As a OSX user i strongly recommend you to use Laravel Homestead to develop your applications.
http://laravel.com/docs/5.0/homestead
You only need to install:
Virtualbox
Vagrant
I have my projects in ~/code folder, so everytime i create a new project, i just:
Add project test domain to my local host file (my-project.app pointing to localhost 127.0.0.1)
ssh into the homestead virtualmachine (homestead ssh)
run built in serve command (serve my-project.app /path/to/project/public)
VoilĂ
The most common reason for this is that the web server process does not have write access to the storage folder and its subfolders.
Set the permissions on the storage folder so that the web server can create files.
You don't have to use php serve, mamp does that for you. Make sure you point your directory to public folder. You can also use custom domain for each of your projects.
Also for Mac there is laravel valet. Easy to get started with many php projects.
I think you should move your Laravel Application to
/Applications/MAMP/htdocs/
and then you can access it on
http://localhost:8888/laravel-app
This is my first time behind Ubuntu: I followed this tutorial to install Apache, PHP, SQL and phpMyAdmin. http://www.howtoforge.com/ubuntu_lamp_for_newbies
I got no errors and everything is working smooth. I then downloaded composer.phar and laravel I ran php composer.phar install and php composer.phar update. No errors here either I then changed apache config to have DirectoryROot at var/www/public.
And enabled rewrite mod: sudo a2enmod rewrite
Standard installation procedure however visiting localhost gives 0 php error messages only shows: Whoops, looks like something went wrong.
Apache error logs show nothing, access log only shows the 500 error. What am I missing I went over the entire procedure 3 times.
I solved the problem.
1) Open Terminal
2) Navigate to your laravel root folder CD var/www
3) Execute sudo chmod -R 777 *
This solved the problem but be careful with this. Make sure your permissions are properly set when you move from local to live.