vi ~/.bash_profile
#to find the file
#grep -s valet ~/.* | grep -v ".bash_history"
#and probably not do the following
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile
#opening new terminal shell helps
Module 'apcu' already loaded in Unknown on line
Remove all the extension lines on top except xdebug
/usr/local/etc/valet-php/7.2/php.ini
brew link [email protected] --force
#brew unlink [email protected] && brew link --force [email protected]
#newer version --force is not always required
cd my_project_folder
valet park
vi /usr/local/etc/nginx//nginx.conf
#comment line include valet/elasticsearch.conf; (as last resort can delete it)
brew install [email protected]
valet use 7.1
valet use 7.4
Valet doesn't support PHP version: 7.4 (try something like '[email protected]' instead)
valet use [email protected]
Installing [email protected]...
.....
[[email protected]] is not installed, installing it now via Brew... 🍻
Error: [email protected] has been disabled because it is a versioned formula!
HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]
Error: [email protected] has been disabled because it is a versioned formula!
brew install shivammathur/php/[email protected]
brew link [email protected]
pecl search sodium
pecl install libsodium
m4 --version
/usr/bin/m4 --version
if you get error message fix them.
valet plus uses apc cache to cache configuration, but PHP 5.6 hard to install apcu_bc so easiet to use function_exists directly in valetplus code to work around it
exit and restarted the shell/console
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Abort trap: 6
to fix
brew remove [email protected]
brew install [email protected]
#if error Download failed: https://www.php.net/distributions/php-5.6.40.tar.xz
brew install [email protected] --build-from-source
$ valet elasticsearch install
[libyaml] Installing
[[email protected]] Installing
Warning: No available formula or cask with the name "[email protected]". Did you mean elasticsearch or elasticsearch@6?
==> Searching for similarly named formulae...
These similarly named formulae were found:
elasticsearch
elasticsearch@6
To install one of them, run (for example):
brew install elasticsearch
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
to fix
brew tap github/bootstrap
In Brew.php line 108:
Brew was unable to install [[email protected]].
mariadbd
# to run server manually from command line to see errors
#log file
/Users/zain/.valet/Log/mysql.log
#data file
/usr/local/var/mysql
#delete following files if issue persist
ib_logfile0
ib_logfile1
#note in rare cases might be only one file
[crit] 97410#0: *5 connect() to unix:/Users/zain/.valet/valet.sock failed (2: No such file or directory)
#check if php-fpm running
ps aux | grep php
#change to anyother php version to see if that helps
valet use php 7.1
#try run fpm manually to see the behaviour
/usr/local/opt/[email protected]/sbin/php-fpm --nodaemonize
#keep an eye on fpm log
less +F /usr/local/var/log/php-fpm.log
#list services
brew services list
#try running services manually
brew services start [email protected]
brew services stop [email protected]
brew services restart [email protected]
#remove / fix brew
valet fix
sudo grm /usr/local/Cellar/[email protected]/7.2.34_4 -rf
ls -la /usr/local/var/homebrew/linked/ | grep -i php
rm /usr/local/var/homebrew/linked/[email protected]
brew install [email protected] --build-from-source
vi /usr/local/etc/nginx/valet/valet.conf
server {
listen 127.0.0.1:80 default_server;
#added this to make sure server_name is passed to phpstorm, as each server can have its own mapping etc
server_name valet-nginx;
vi /usr/local/etc/nginx/fastcgi_params
fastcgi_param SERVER_NAME $server_name;
Once PHP 8.1 is properly installed via valet
composer global remove laravel/valet
brew unlink [email protected]
brew unlink [email protected]
brew link [email protected] --force --overwrite
php -v
composer global require laravel/valet:^3.0.0
# changing to PHP 7.1
composer global remove laravel/valet
composer global remove symfony/event-dispatcher
brew unlink [email protected]
brew unlink [email protected]
brew link [email protected] --force --overwrite
php -v
composer global require laravel/valet:^2.0.0
php -v
valet stop php
valet restart php
vi /opt/homebrew/etc/nginx/fastcgi_params && valet restart nginx
proxy_send_timeout 1800s;
proxy_read_timeout 1800s;
fastcgi_send_timeout 1800s;
fastcgi_read_timeout 1800s;
(editing other locations won't help)