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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new libphp7.so path

black-snow opened this issue · comments

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?

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.

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.

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.

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

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

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

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.

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

commented

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