vscode-phpserver icon indicating copy to clipboard operation
vscode-phpserver copied to clipboard

PHP Server not working after brew upgrade to php 7.4 in OSX?

Open SamuelMiller opened this issue 3 years ago • 0 comments

After upgrading from 7.3 to 7.4 using brew in OSX Catalina, the PHP Server extension in VS Code no longer works. Selecting "PHP SERVER: Serve Project' just shows the php code in the browser as a text file. It no longer starts the php server. I think I was using the built in 7.3 that comes with OSX Catalina before. I followed these instructions:

brew install [email protected]
brew link --force --overwrite [email protected] 
brew services start [email protected] 
export PATH="/usr/local/opt/[email protected]/bin:$PATH" 
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"

The command "php -v" in the terminal gives me the correct version 7.4. I don't know how to set PHP Server to the upgrade? Adding the following (paths from running "which php" and "php -ini" in terminal) to vscode's settings.json did not work:

"phpserver.phpConfigPath": "/usr/local/etc/php/7.4/php.ini",
"phpserver.phpPath": "/usr/local/opt/[email protected]/bin/php",

Any suggestions would be greatly appreciated.

SamuelMiller avatar Aug 09 '22 02:08 SamuelMiller