Skip to content

Instantly share code, notes, and snippets.

@jonathanstegall
Last active August 31, 2021 16:31
Show Gist options
  • Select an option

  • Save jonathanstegall/929957cb04c7f9cc5ab98c51f84fe9b1 to your computer and use it in GitHub Desktop.

Select an option

Save jonathanstegall/929957cb04c7f9cc5ab98c51f84fe9b1 to your computer and use it in GitHub Desktop.

When a new version of PHP is installed, to keep up with the WordPress VIP Go environment locally we need to do a few things:

  1. pecl install gmagick
  2. If #1 fails with a beta warning, use pecl install channel://pecl.php.net/gmagick-2.0.6RC1 instead (replace with the correct version if necessary)
  3. pecl install memcache
  4. code /usr/local/etc/php/[version]/php.ini to open the ini file. Uncomment the lines extension="gmagick.so" and extension="memcache.so"
  5. valet restart

And to make curl stop complaining about the SSL, do this:

  1. Download the file at http://curl.haxx.se/ca/cacert.pem
  2. Run mv cacert.pem /usr/local/etc/php/[version]/
  3. code /usr/local/etc/php/[version]/php.ini to open the ini file. Change the line ;curl.cainfo = to curl.cainfo = "/usr/local/etc/php/[version]/cacert.pem"
@jonathanstegall

Copy link
Copy Markdown
Author

May have to run valet use php@7.4' and possibly with --force` to switch the PHP version to match whatever VIP is running.

@jonathanstegall

jonathanstegall commented Aug 31, 2021

Copy link
Copy Markdown
Author

If memcache install fails, do this:

pecl download memcache
open memcache-8.0.tgz  
cd memcache-8.0/memcache-8.0
phpize
./configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11
make
sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment