switch-php icon indicating copy to clipboard operation
switch-php copied to clipboard

Doesn't seem to be working when switching from the latest version of PHP

Open moorebrett0 opened this issue 5 years ago • 15 comments

Hey there!

When I try and switch from php 7.4.5, nothing seems to happen.

brett~/Sites$ switch-php 7.1
Password:
Valet stopped ✔
PHP switched ✔
Valet started ✔

You are now using PHP 7.4.5

I'd expect PHP 7.1 to be in use after running this.

moorebrett0 avatar May 18 '20 15:05 moorebrett0

Same here.

❯ php --version
PHP 7.4.6 (cli) (built: May 29 2020 01:44:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies


❯ switch-php 7.3 -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to [email protected]...
 ==>  Stopping [email protected]...
 ==>  Unlinking [email protected]...
 ==>  Linking [email protected]...
 ==>  Starting [email protected]...
 ✅  PHP switched

You are now using PHP 7.4.6


❯ php --version
PHP 7.4.6 (cli) (built: May 29 2020 01:44:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies


eleftrik avatar Jun 03 '20 14:06 eleftrik

@eleftrik aha I know exactly what's happening to you - I'll push a fix here in a bit.

@moorebrett0 not sure why yours is doing that... 🤔 Can you try running switch-php in verbose mode and sharing that here? Maybe also give me the output of brew services list while you're at it...

jalendport avatar Jun 04 '20 02:06 jalendport

@eleftrik aha I know exactly what's happening to you - I'll push a fix here in a bit.

@jalendport Any news about this? Thank you very much

eleftrik avatar Jun 09 '20 14:06 eleftrik

Hi @jalendport having this same issue when trying to switch from 7.4.7 to 7.2

> switch-php 7.2 -m 1024M -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to [email protected]...
 ==>  Stopping [email protected]...
 ==>  Unlinking [email protected]...
 ==>  Linking [email protected]...
 ==>  Starting [email protected]...
 ✅  PHP switched

You are now using PHP 7.4.7

tolu-paystack avatar Jun 15 '20 15:06 tolu-paystack

Same here

You are now using PHP 7.4.7
$ switch-php 7.2 -v -m 512M
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🛑  Stopping Valet...
 ==>  Stopping nginx...
 ✅  Valet stopped
 🔀  Switching to [email protected]...
 ==>  Stopping [email protected]...
 ==>  Unlinking [email protected]...
 ==>  Linking [email protected]...
 ==>  Starting [email protected]...
 ✅  PHP switched
 ⚙  Starting Valet...
 ==>  Starting nginx...
 ==>  Starting dnsmasq...
 ✅  Valet started
 🎛  Configuring PHP...
 ==>  Setting PHP memory to 512M...
 ==>  Restarting PHP...
 ✅  PHP configured

You are now using PHP 7.4.7

ssssct avatar Jul 01 '20 13:07 ssssct

Unfortunately I have the same issue. Thank for your support.

davideprevosto avatar Jul 01 '20 17:07 davideprevosto

Having the same issue, is there any news?

imtbl avatar Jul 21 '20 09:07 imtbl

@jalendport -

Verifying that Valet is installed...
Password:
🔍  Checking which PHP versions are installed...
🛑  Stopping Valet...
==>  Stopping nginx...
✅  Valet stopped
🔀  Switching to [email protected]...
==>  Stopping [email protected]...
==>  Unlinking [email protected]...
==>  Linking [email protected]...
==>  Starting [email protected]...
✅  PHP switched
⚙  Starting Valet...
==>  Starting nginx...
✅  Valet started

and brew services list:

Name      Status  User  Plist
dnsmasq   started root  /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
mysql     started root  /Library/LaunchDaemons/homebrew.mxcl.mysql.plist
[email protected] started root  /Library/LaunchDaemons/[email protected]
nginx     started root  /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php       started root  /Library/LaunchDaemons/homebrew.mxcl.php.plist
[email protected]   started brett /Users/brett/Library/LaunchAgents/[email protected]

moorebrett0 avatar Jul 22 '20 18:07 moorebrett0

@jalendport Just to know... Is this project dead?

eleftrik avatar Sep 01 '20 12:09 eleftrik

Kind of the same as everybody I use httpd to compile php

switch-php 7.4 -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to [email protected]...
 ==>  Stopping [email protected]...
 ==>  Unlinking [email protected]...
 ==>  Stopping [email protected]...
 ==>  Unlinking [email protected]...
 ==>  Linking [email protected]...
 ==>  Starting [email protected]...
 ✅  PHP switched

You are now using PHP 7.2.34
brew services list
Name    Status  User Plist
httpd   started ...  ...
php     stopped      
[email protected] stopped      
[email protected] started ...  ...
redis   started ...  ...

joelpro2 avatar Mar 04 '21 15:03 joelpro2

@jalendport Just to know... Is this project dead?

Doesn't seem so, the last issue closed was in 2019 #12 by souhaiebtar was closed on 16 Nov 2019

joelpro2 avatar Mar 04 '21 15:03 joelpro2

same issue here

Preshy avatar Apr 14 '21 23:04 Preshy

@jalendport Has this project been discontinued?

encodiaweb avatar Apr 15 '21 15:04 encodiaweb

@encodia I believe it has.

moorebrett0 avatar Apr 15 '21 16:04 moorebrett0

@encodia I believe it has.

Of course it has... Ok, it's open source, nothing is due to anyone, but in such a case I think it's better to mark a project as discontinued / not maintained.

encodiaweb avatar Apr 16 '21 11:04 encodiaweb