In the windows 10 operating system I installed a homestead laravel for project deployment.
After I worked in a vagrant homestead virtual machine, I ran the command vagrand halt
The next day I launched a homestate with the command vagrant up
I connected via SSH to the homestead virtual machine, enter the command php artisan and get the error:
In LoadConfiguration.php line 68:
Unable to load the "app" configuration file.
When opening the site, the error is as follows:
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/vagrant/code/projects/forum/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
RuntimeException: A facade root has not been set. in /home/vagrant/code/projects/forum/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
This has already been solved, on GitHub: https://github.com/laravel/homestead/issues/1219
Try upgrading to VM 6.
Update
Download and install the latest version of vagrant:
https://www.vagrantup.com/downloads.html
Updating homestead:
vagrant global-status
This will list all your vagrant boxes with box name in the 2nd column
vagrant box update "{box_name}"
Download and install the latest VM: https://www.virtualbox.org/wiki/Downloads
Here you may need to uninstall the old version at first
Related
I'm using Vagrant/Homestead/Virtualbox ~ Vagrant version 2.2.10 | Homestead 10.1.1 | Virtualbox 5.2
I'm running the SilverStripe installation on PHP7.4 and my PHP CLI version is also PHP7.4
Following the SilverStripe installation instructions I've ran the following:
composer create-project silverstripe/installer client-folder
When I load up my installation for the first time I get the following error: (I've censored out the client's name)
Weirdly, even though install.php is no longer included with the installed, I got an old install.php file and ran it and the install.php page loaded up perfectly. When I then ran the install script it gave me the error above again.
I've gone through and made sure all the required extensions are installed.
Could anyone advise on how to fix this please?
I've had a look at this. I tried to destroy my vagrant box using the 'vagrant destroy' command but it didn't work.
I ended up opening up the Virtual Box UI and I then destroyed my Vagrant local machine using that interface.
Afterwards, I ran Vagrant Up to create the 'new' box for the 'first time'.
Silverstripe now loads up perfectly well. As a side, Laravel also didn't work and now works.
In short, it was a problem with my local machine and not SilverStripe.
I'm developping an app under windows 10 + wamp + php 7 + Symfony 3.3
I'm trying to use the built-in server :
php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000
// Quit the server with CONTROL-C.
And when I go to http://localhost:8000/app_dev.php/ or http://127.0.0.1:8000/app_dev.php
I get this error :
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\wamp\www\myproject\vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php' (include_path='.;C:\php\pear') in Unknown on line 0
Same error under every routes. My routes are correct and works fine outside of the built-in server...
Can you help me with this issue please ?
I had same problem,
Solved by :
Delete symfony folder in vendor
composer update
If you have antivirus (like Avast) disable it before launching web
server
php bin/console server:run
I got the same error, even when installing via composer.
It turns out that for whatever reason when composer downloaded the project, the required file listed in the error you get (vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php) was not included...
To fix this, I manually added it from https://github.com/symfony/web-server-bundle/blob/master/Resources/router.php and then my symfony app worked as expected.
I had to restart my computer in order to actually add the file because somehow I was locked out of adding it even as admin in Windows after launching the php server.
UPDATE:
Even better than manually adding the file, I just deleted the symfony folder from the vendor folder in the project and reran composer update. the router.php file is indeed downloaded. Sometimes when running bin/console server:run it gets deleted. Not sure why.
It happened to me when upgrading from Symfony 3.1 to Symfony 3.4.
The reason was that I had left the development server running when I executed the command:
composer update
The solution:
Delete the contents of vendor folder
Execute composer update
Install the new Symfony development server bundle (follow the instructions)
Execute the server for development in a new port
php bin/console server:start localhost:3421
I had this problem too : it was AVAST that blocked the "router.php" file.
I went into avast -> protection -> quarantine, and put an exception of the router.php file
And then everything worked again
I get the same error and I solve this issue by installing the project with composer
composer create-project symfony/framework-standard-edition my_project_name
I have a freshly installed Laravel. I did a vagrant destroy --force before installation.
Every time I run anything using vagrant on my laravel project directory, I get this error.
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /Applications/MAMP/htdocs/Sites/project-flyer/Vagrantfile
Line number: 12
Message: LoadError: cannot load such file -- /Applications/MAMP/htdocs/Sites/project-flyer/vendor/laravel/homestead/scripts/homestead.rb
exit 1
Now, I've checked, looking for homestead.rb but vendor/laravel/homestead folder doesn't exist. I'm lost.
It seems there is a broken homestead installation in your directory. You could do:
Deinstall the existing homestead with composer remove laravel/homestead
Reinstall homestead with composer require laravel/homestead --dev
Initizialie homestead and Vagrant configuration php vendor/bin/homestead make
For details you can also consult the homestead documentation.
yesterday i started to install raspbian on my raspberry b+ to create a development machine to test October cms.
I install:
apache 2
php - 5.6.14
mysql
phpmyadmin
Then i follow this link to installa october cms:
https://adrianmejias.com/blog/post/october-cms
https://octobercms.com/docs/console/commands
But i have encouter different problems. I installed composer as root then try to create project to pull the october dev-master.
I received this error:
"Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/local/bin/composer.phar/vendor/ symfony/console/Application.php:954"
I solved the first problem with this:
having trouble installing composer
I tried again to instyall all but when composer pull down symfony files there was a root problem, i think due to the fact root took all allocated memory i do and "df -i" and i see "/dev/root have inodes 100% but dev/root have 12000mb" of space so i didn't understand.
Try so to install again composer as pi but without success!
Now i try to mysql -version and also have problem with mysql.
"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"
I think it's all correlated with memory limit (that is a good excercise in this case bacause ipothetycal vps have this problem), but i can't figured out what is this.
Have some suggestions? Did i made mistake with swap file? or another?
Thanks
Gabriele
If still interested, try increasing the swap size:
sudo nano /etc/dphys-swapfile
change this line: CONF_SWAPSIZE=100 to this: CONF_SWAPSIZE=512, than:
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
I am trying to install the latest version of Laravel Homestead on my PC and when I try running the command homestead init in my command terminal, I keep getting a "Could not open input file" error.
Steps I've taken so far with installing Laravel Homestead:
1) Created a new directory at C:\Users\Jeff\Desktop\Code
2) Installed Composer
3) Installed VirtualBox and Vagrant Box
4) In 'cmd', ran the command vagrant box add laravel/homestead
5) Copied the Composer files from C:\ProgramData\ComposerSetup\bin into my C:\Users\Jeff\Desktop\Code directory.
6) In 'cmd', ran the command composer global require "laravel/homestead=~2.0"
Since I am following the Laravel homestead installation guide the next step is to copy the ~/.composer/vendor/bin directory to my PATH so that the homestead command is executable but this is where I get confused.
I have tried a couple of things but they have not worked for me.
In my ~/.composer/vendor/bin directory, I have copied the homestead directory files into my C:\Users\Jeff\Desktop\Code directory but when I try running the command homestead init, I keep getting the error Could not open input file: C:\Users\Jeff\Desktop\Code/../laravel/homestead/homestead
On Windows use homestead.bat init instead of homestead init.