Trying to install valet-plus however running into some problems. Looking through other issues I tried using valet fix but no good, any thoughts on what could be the problem based on the output from valet fix and valet install below?:
➜ valet fix
Removing all old php56- packages from homebrew/php tap
Removing all old php70- packages from homebrew/php tap
Removing all old php71- packages from homebrew/php tap
Removing all old php72- packages from homebrew/php tap
Removing all old n98-magerun packages from homebrew/php tap
Removing drush package from homebrew/php tap
[php5.6] Disabling modules: apcu, intl, mcrypt
[php7.0] Disabling modules: apcu, intl, mcrypt
[php7.1] Disabling modules: apcu, intl, mcrypt
[php7.2] Disabling modules: apcu, intl, mcrypt
Installing and linking new PHP homebrew/core version.
Uninstalling /usr/local/Cellar/[email protected]/7.1.18... (514 files, 67.1MB)
==> Downloading https://homebrew.bintray.com/bottles/[email protected]_sierra.bottle.tar.gz
Already downloaded: /Users/robstanley/Library/Caches/Homebrew/[email protected]_sierra.bottle.tar.gz
==> Pouring [email protected]_sierra.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall [email protected]`
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.1/
This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/[email protected]/lib
CPPFLAGS: -I/usr/local/opt/[email protected]/include
To have launchd start [email protected] now and restart at login:
brew services start [email protected]
Or, if you don't want/need a background service you can just run:
php-fpm
==> Summary
🍺 /usr/local/Cellar/[email protected]/7.1.18: 514 files, 67.1MB
Unlinking /usr/local/Cellar/[email protected]/7.1.18... 0 symlinks removed
Linking /usr/local/Cellar/[email protected]/7.1.18... 25 symlinks created
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc
Please check your linked php version, you might need to restart your terminal!
Linked PHP should be php 7.1:
PHP 7.1.18 (cli) (built: May 25 2018 19:18:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
[PECL] Checking pear config...
Checking php 5.6...
Skipping 5.6, Pear config path could not be found at: /usr/local/etc/php/5.6/pear.conf
Checking php 7.0...
Skipping 7.0, Pear config path could not be found at: /usr/local/etc/php/7.0/pear.conf
Checking php 7.1...
Skipping 7.1, Pear config path could not be found at: /usr/local/etc/php/7.1/pear.conf
Checking php 7.2...
Skipping 7.2, Pear config path could not be found at: /usr/local/etc/php/7.2/pear.conf
➜ valet install
[php] Checking for errors within the php installation...
[nginx] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[mysql] Stopping
[redis] Stopping
[devtools] Installing tools
[wp-cli] Installing
[pv] Installing
[geoip] Installing
[binaries] Installing binaries
[nginx] Installing
Warning: file_get_contents(/usr/local/etc/php/7.1/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 112
Warning: file_put_contents(/usr/local/etc/php/7.1/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 125
Warning: file_get_contents(): Filename cannot be empty in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 112
Warning: file_put_contents(): Filename cannot be empty in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 125
Warning: chown(): No such file or directory in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 258
[PECL] Updating PECL channel: pecl.php.net
[PECL] Installing extensions
Warning: file_get_contents(): Filename cannot be empty in /Users/robstanley/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 112
In Pecl.php line 142:
Could not find ini definition for: apcu_bc in
install [--with-mariadb]
Finally resolved this by noticing the /usr/local/etc/php/7.1/ directory was owned by root and brew was failing to install php-fpm as a result. After using chown and reinstalling [email protected] and rerunning valet fix && valet install my issue is now resolved.
Most helpful comment
Finally resolved this by noticing the
/usr/local/etc/php/7.1/directory was owned byrootandbrewwas failing to installphp-fpmas a result. After usingchownand reinstalling[email protected]and rerunningvalet fix && valet installmy issue is now resolved.