hi .
Os : Mac Os Mojave
php Version : 7.3 ( new installed )
valet version : 2.1.5
today , after run command : brew update && brew upgrade and run valet restart , my valet stoped
try to upgrade php version and run valet uninstall and again valet install , output this error :
PHP Warning: file_get_contents(/usr/local/etc/php/7.3/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/myUser/.composer/vendor/laravel/
valet/cli/Valet/Filesystem.php on line 112
Warning: file_get_contents(/usr/local/etc/php/7.3/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/myUser/.composer/vendor/laravel/valet
/cli/Valet/Filesystem.php on line 112
PHP Warning: file_put_contents(/usr/local/etc/php/7.3/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/myUser/.composer/vendor/laravel/
valet/cli/Valet/Filesystem.php on line 125
Warning: file_put_contents(/usr/local/etc/php/7.3/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/myUser/.composer/vendor/laravel/valet
/cli/Valet/Filesystem.php on line 125
after downgrade to php 7.2 but problem not resolve !
please help me ...
I have the same problem and have tried to debug this. Seems to be problem with new version of Valet and Mojave. I have PHP 7.2.8 installed but it wont work....
I got Valet working again by downgrading to version 2.0.12.
UPDATE: Sorry, I did not work. It seem to be problem with dnsmasq some how.
@webafra @webartistse
Valet works fine on several Mojave computers I've tested it on. Including with PHP 7.3. For fresh installs on new machines, and for upgrades from older valet and PHP versions.
Those file_get_contents ... no such file or directory errors suggest that the PHP config files are not in the location where Homebrew normally places them. This could be a result of many things, including old PHP versions installed, different compile-time options passed to Homebrew when installing your PHP 7.3, or other causes undetectable without understanding more about your specific computer. It could even be permission-related on the filesystem.
When you run valet install (which you must do after upgrading to a new major PHP version), it attempts to add valet-specific PHP configs and nginx configs, which Homebrew normally places into /usr/local/etc/php/VERSION/php-fpm.d. In your case that directory appears to be missing, or the expected www.conf file isn't present in there so it cannot be updated.
To better understand what your unique fix may require, please provide the output of each of the following commands:
which php
php -v
brew services list
brew info php
ls -al /usr/local/etc/php /usr/local/etc/php/7.3 /usr/local/etc/php/7.3/php-fpm.d
ls -al /usr/local/etc/php/7.3/conf.d
Also, what's the "history" of this computer?
What special Homebrew switches have you used when installing PHP in the past? (ie: --switch-name)
What PHP version was in use before running brew update && brew upgrade?
@webafra @webartistse
I had this problem today too. I upgraded from php 7.2 to 7.3 and started getting the no such file errors on valet install as well. I eventually tracked it down to /usr/local/etc/php/7.3 was owned by root rather than by my user.
Once I ran sudo chown -R MYUSER:MYGROUP /usr/local/etc/php/7.3 and reinstalled brew reinstall php it fixed my issue.
@drbyte Well... you can slap me twice if you will but I have solved my problem now... turned out that I had laradock running witch docker so one container served every request with a default 404.
I expect this is solved by today's release of v2.1.6
I'm going to close, and folks can open new ones if they have similar problems in Valet 2.1.6+. If you run into this issue from Google, please, make sure you're on the latest release before commenting here. Thanks!
@webafra @webartistse
I had this problem today too. I upgraded from php 7.2 to 7.3 and started getting the no such file errors onvalet installas well. I eventually tracked it down to /usr/local/etc/php/7.3 was owned byrootrather than by my user.Once I ran
sudo chown -R MYUSER:MYGROUP /usr/local/etc/php/7.3and reinstalledbrew reinstall phpit fixed my issue.
Worked for me as well, Thanks
@webafra @webartistse
I had this problem today too. I upgraded from php 7.2 to 7.3 and started getting the no such file errors onvalet installas well. I eventually tracked it down to /usr/local/etc/php/7.3 was owned byrootrather than by my user.Once I ran
sudo chown -R MYUSER:MYGROUP /usr/local/etc/php/7.3and reinstalledbrew reinstall phpit fixed my issue.
works for me as well, Thanks
Most helpful comment
@webafra @webartistse
I had this problem today too. I upgraded from php 7.2 to 7.3 and started getting the no such file errors on
valet installas well. I eventually tracked it down to /usr/local/etc/php/7.3 was owned byrootrather than by my user.Once I ran
sudo chown -R MYUSER:MYGROUP /usr/local/etc/php/7.3and reinstalledbrew reinstall phpit fixed my issue.