Skip to content

Installation on Mac OSX

Chung Leong edited this page Jan 10, 2022 · 11 revisions

If you do not wish to compile QB from source, you can download a pre-compiled binary. Select the package matching the version of PHP installed on your system. These shared libraries are created for freshly compiled version of PHP. They may or may not work with the executables that comes with the operation system.

Activate the extension by following the instructions below.

Compiling QB with phpize

Download the QB source tarball and uncompress it. In a console, cd to the directory containing the QB source code. Enter the command phpize. You should get a response resembling the following:

PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

Run ./configure.

Run make to build the extension. The process might take five to ten minutes.

The shared library qb.so should now be in the modules subfolder.

Compiling QB with Homebrew

A Homebrew formula for QB is available. You can compile QB with the following command:

brew install https://raw.github.com/chung-leong/qb/homebrew/php-qb.rb

Run brew --prefix php-qb to learn where the Homebrew has placed the files.

Activating QB

Copy qb.so to the PHP extension folder. You can learn the location by running php -i | sed -n 's/extension_dir => \(.*\) => .*/\1/p'. Copy qb.ini into PHP's configuration folder. You can obtain its location by running php --ini | sed -n 's/.*ini files in: \(.*\)/\1/p'.

Clone this wiki locally