philcook / brew-php-switcher

Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.
MIT License
961 stars 90 forks source link

new libphp7.so path #41

Closed black-snow closed 5 years ago

black-snow commented 6 years ago

It seems like the libphp7.so will now be found at /usr/local/opt/php72/lib/httpd/modules/libphp7.so (see Homebrew/homebrew-core#25018).

Is brew-php-switcher ready for this?

cjwilburn commented 6 years ago

Hi @black-snow can you confirm that you're only seeing this issue when you're updating php@7.2 with Apache? When installing without the --with-httpd flag, this appears to not be an issue.

cjwilburn commented 6 years ago

It also looks like php@7.2 no longer supports the --with-httpd flag, so I'm not certain that this issue wouldn't be considered an edge case. However, I cannot speak for @philcook who is the primary maintainer of this project.

black-snow commented 6 years ago

Most of the flags are said to be set by default for 7.2+ The fix should be rather easy, I think - we'll have to check both paths and use the first that fits.

SMillerDev commented 6 years ago

/usr/local/opt/php/lib/httpd/modules is perhaps a more update resilient path to use for this.

black-snow commented 6 years ago

@SMillerDev I think that path might be used for PHP 7.3 and following in the future so we can't use it (unless we introduce a keyword like latest).

SMillerDev commented 6 years ago

It would be the path to the php version you selected with brew switch yeah

black-snow commented 6 years ago

Oh really? Do we need any different paths at all then? We also don't need to touch httpd.conf then, do we? Just brew switch the version behind that and apachectl restart.

SMillerDev commented 6 years ago

If you only use 7.x versions and they're migrated to core I think that should be the case. No promises though :smile:

njovujsh commented 2 years ago

/opt/homebrew/opt/php@7.4/lib/httpd/modules/libphp7.so