Yosemite 10.10.5
El Capitan 10.11.6
Sierra 10.12.6
High Sierra 10.13.6
Mojave 10.14.1
https://www.youtube.com/playlist?list=PLj1Ut5Njs4XwJ3ywgCH6c57GTAqUuSnYv
EXTRA
ZipArchive
https://www.youtube.com/watch?v=PD1sZIlrqCs
So apparently the liip
website said that the included extensions are
bcmath bz2 calendar Core ctype curl date dom dtrace ereg exif fileinfo filter ftp gd gettext hash iconv imap intl json ldap libxml mbstring mcrypt memcache memcached mhash mongodb odbc mysql mysqli mysqlnd OAuth odbc openssl pcntl pcre PDO pdo_dblib pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix Reflection session shmop SimpleXML soap sockets solr SPL SQLite sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xdebug xhprof xml xmlreader xmlrpc xmlwriter xsl zip zlib Xdebug
And near the end of that, you can see that it has zip
and zlib
as included extensions, but I believe it’s a lie. If zip
was included then you can automatically use ZipArchive
, but you actually can’t. If you tried to use ZipArchive
, you will receive this error message.
Fatal error: Class 'ZipArchive' not found in
This is because zip
actually isn’t included. I have tried to add extension=zip.so
in the 99-liip-developer.ini
file and the error message still continues so that means that zip
actually doesn’t exist as an included extension. To fix this problem, we have to install zip
via Pecl
which means that we have to build it ourselves. Doing this process isn’t easy. We need a couple of things because zip
has dependencies. We need to install Homebrew
to install phpize
, autoconf
, and fix the old libzip
in our Mac
system. You may ask why we don’t just install Homebrew
to install PHP
from the beginning and that is because I don’t use Homebrew
for PHP
. The main purpose of using Homebrew
during this stage is to install phpize
and autoconf
. Otherwise, we’d actually avoid Homebrew
altogether since we are installing PHP
via liip
and no other process during our installation uses Homebrew
.
UPGRADING PHP
https://www.youtube.com/watch?v=nVh136iqUF8
Remember to re-enable all of the extensions you may need when you upgrade PHP
versions because the new 99-liip-developer.ini
file doesn’t contain your old 99-liip-developer.ini
configurations. This should include adding extension=zip.so
to the 99-liip-developer.ini
file as well if you are using ZipArchive
.