GithubHelp home page GithubHelp logo

Comments (8)

DHorning42 avatar DHorning42 commented on August 23, 2024

So... don't hit brew update. Got it!

from brew-php-switcher.

dbalabka avatar dbalabka commented on August 23, 2024

@phoenixg try to install HEAD version:

brew upgrade brew-php-switcher --HEAD

from brew-php-switcher.

phoenixg avatar phoenixg commented on August 23, 2024

@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.

ikari7789 avatar ikari7789 commented on August 23, 2024

@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.

phoenixg avatar phoenixg commented on August 23, 2024

@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.

dbalabka avatar dbalabka commented on August 23, 2024

@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:

  1. I have upgraded all PHP versions
  2. 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.

ikari7789 avatar ikari7789 commented on August 23, 2024

Upgraded version of this script was finally merged into homebrew. Closing ticket.

from brew-php-switcher.

lookphp avatar lookphp commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.