Comments (8)
So... don't hit brew update. Got it!
from brew-php-switcher.
@phoenixg try to install HEAD version:
brew upgrade brew-php-switcher --HEAD
from brew-php-switcher.
@torinaki Seems not working
# phx at phx.local in ~ [9:43:47]
→ brew-php-switcher 5.6
Switching to [email protected]
Switching your shell
Unlinking /usr/local/Cellar/[email protected]/5.6.36... 25 symlinks removed
Unlinking /usr/local/Cellar/[email protected]/7.1.17... 0 symlinks removed
Unlinking /usr/local/Cellar/php/7.2.5... 0 symlinks removed
Linking /usr/local/Cellar/[email protected]/5.6.36... 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
You will need sudo power from now on
Switching your apache conf
Password:
Restarting apache
All done!
# phx at phx.local in ~ [9:44:02]
→ php --version
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/[email protected]/7.1.17/lib/php/20160303/imagick.so' - dlopen(/usr/local/Cellar/[email protected]/7.1.17/lib/php/20160303/imagick.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/[email protected]/7.1.17/lib/php/20160303/imagick.so' - dlopen(/usr/local/Cellar/[email protected]/7.1.17/lib/php/20160303/imagick.so, 9): image not found in Unknown on line 0
PHP 7.1.17 (cli) (built: Apr 26 2018 22:04:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.17, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
from brew-php-switcher.
@PhoenixNG I’d suggest trying to manually unlinking the old php brews if you still have them installed. It’s working on my machine, but I completely deleted and reinstalled PHP between the switch. It was a major change that was extremely poorly executed. May still be cruft leftover from before. I’m hoping that in the future that this script could also help manage extensions as well, but for now that needs to be handled by the user.
brew unlink php56
brew unlink php70
brew unlink php71
brew unlink php72
from brew-php-switcher.
@ikari7789 @philcook After I unlink and uninstall all of these, I have not those error anymore, I can switch to PHP 5.6/7.2 now. But I meet a new problem:
php --version
Failed loading /usr/local/opt/php56-xdebug/xdebug.so: dlopen(/usr/local/opt/php56-xdebug/xdebug.so, 9): image not found
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-igbinary/igbinary.so' - dlopen(/usr/local/opt/php56-igbinary/igbinary.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-kafka/kafka.so' - dlopen(/usr/local/opt/php56-kafka/kafka.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-mongodb/mongodb.so' - dlopen(/usr/local/opt/php56-mongodb/mongodb.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-mysqlnd_ms/mysqlnd_ms.so' - dlopen(/usr/local/opt/php56-mysqlnd_ms/mysqlnd_ms.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-rdkafka/rdkafka.so' - dlopen(/usr/local/opt/php56-rdkafka/rdkafka.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-redis/redis.so' - dlopen(/usr/local/opt/php56-redis/redis.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-swoole/swoole.so' - dlopen(/usr/local/opt/php56-swoole/swoole.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-zookeeper/zookeeper.so' - dlopen(/usr/local/opt/php56-zookeeper/zookeeper.so, 9): image not found in Unknown on line 0
PHP 5.6.36 (cli) (built: Apr 26 2018 22:03:06)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
I tried to install using PECL, but failed:
→ pecl install igbinary
No releases available for package "pecl.php.net/igbinary"
install failed
How do I install my missing dynamic libraries using PECL?
from brew-php-switcher.
@philcook I had completely the same issue. The newest version (HEAD) have solved this issue for me. It wasn't the only change I did:
- I have upgraded all PHP versions
- There were some problems with extensions. I have installed some extensions via pecl, because some of them are not available in brew anymore.
Here is my $PATH value:
echo $PATH
/usr/local/sbin:/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/include/darwin:/Users/torinaki/.cabal/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
from brew-php-switcher.
Upgraded version of this script was finally merged into homebrew. Closing ticket.
from brew-php-switcher.
brew-php-switcher 5.6
Switching to [email protected]
Switching your shell
Unlinking /usr/local/Cellar/[email protected]/5.6.38... 0 symlinks removed
Unlinking /usr/local/Cellar/[email protected]/7.0.32... 25 symlinks removed
Unlinking /usr/local/Cellar/[email protected]/7.1.22... 0 symlinks removed
Unlinking /usr/local/Cellar/php/7.2.10... 0 symlinks removed
Linking /usr/local/Cellar/[email protected]/5.6.38... 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
You will need sudo power from now on
Switching your apache conf
grep: /etc/apache2/httpd.conf: No such file or directory
sed: /etc/apache2/httpd.conf: No such file or directory
grep: /etc/apache2/httpd.conf: No such file or directory
sed: /etc/apache2/httpd.conf: No such file or directory
grep: /etc/apache2/httpd.conf: No such file or directory
sed: /etc/apache2/httpd.conf: No such file or directory
grep: /etc/apache2/httpd.conf: No such file or directory
sed: /etc/apache2/httpd.conf: No such file or directory
sed: /etc/apache2/httpd.conf: No such file or directory
Restarting apache
All done!
it was switched ,but apache can not use ,just print php lines and don't have function . how to change apache 's httpd.conf
my path is /usr/local/etc/http/httpd.conf
from brew-php-switcher.
Related Issues (20)
- php-brew-switcher 5.6 only effected in Cli, but not php-fpm HOT 1
- Add support for v7.3 HOT 3
- Fork for maintainability? HOT 3
- Cannot switch to PHP @7.1 HOT 5
- version 2.1 not release HOT 5
- Creating a file called 101300 HOT 1
- Ports to Linux? HOT 3
- icu4c PHP dependency HOT 4
- PATH env var HOT 1
- bison: undefined method `uses_from_macos'
- brew-php-switcher still shows either version in iTerm after switching HOT 2
- apache not restarted HOT 2
- Have you tested with PHP v8 HOT 1
- Unknown version of PHP 8 HOT 3
- apache config does not change HOT 2
- Tag a new version 2.5 for PHP 8.2 support HOT 2
- Switch to 8.2 HOT 2
- Doesn't support php 8.2 HOT 3
- Please support PHP 8.2 and httpd install by homebrew HOT 5
- Please add support for php 8.3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew-php-switcher.