Discuss this help topic in SecureBlackbox Forum
Installing and Using SecureBlackbox PHP edition
Building with php on Linux and MacOS X
Copy contents of "$INSTALL_PATH/ExtensionSources" to php-src/ext directory.
Run the following commands from php source folder:
./buildconf --force
./configure --disable-all --with-sbb=$INSTALL_PATH/Libraries/All/$OS_VERSION ...custom php build options...
make
make test
make install
Building with phpize utility on Linux and MacOS X
Enter the "$INSTALL_PATH/ExtensionSources/sbb" folder and run the following commands:
phpize
./configure --with-sbb=$INSTALL_PATH/Libraries/All/$OS_VERSION
make
sudo make install
Building on Windows
Normally a pre-built extension could be found in the "$INSTALL_PATH\Extensions" subfolder. To compile the extension from sources, first Build your own PHP on Windows. Then execute the following commands in the PHP source folder:
buildconf.bat --force --add-modules-dir="$INSTALL_PATH\ExtensionSources"
configure.bat --disable-all --with-sbb=shared ...custom php build options...
nmake
MacOS X
After successfully compiling SecureBlackbox extension you would need to install appropriate SecureBlackbox dynamic library from "$INSTALL_PATH/Libraries" directory.
To prevent build errors, in many cases it is a good idea to change the dynamic library's default installatio path using "otool" and "install_name_tool" Xcode commands.
To check current path to the library on, e.g., MacOS64, use the following terminal commands:
otool -L $INSTALL_PATH/Libraries/MacOS64/libsbbphp.dylib
the first entry of the output list contains the required information.
Alternatively, to get only the path to the "libsbbphp.dylib":
otool -D $INSTALL_PATH/Libraries/MacOS64/libsbbphp.dylib libsbbphp.dylib
The following command will change this path to the desired value:
install_name_tool -id "<new_path>/libsbbphp.dylib" <current path>/libsbbphp.dylib"
Linux
After successfully compiling SecureBlackbox extension you would need to install appropriate SecureBlackbox dynamic library from "$INSTALL_PATH/Libraries" directory.
extension=sbb.so
sbb.license_key=ABCD...
Windows
Copy the appropriate SecureBlackbox extension from "$INSTALL_PATH\Extensions" (if not customly built) to the folder containing your PHP loadable extensions (modules).
Copy the appropriate SecureBlackbox library from "$INSTALL_PATH\Libraries" to the directory where php.exe/httpd.exe reside, or add the corresponding extension's directory to the search path.
For example:
For PHP 5.5.x 64-bit Non Thread Safe (NTS) take the extension from "$INSTALL_PATH\Extensions\All\5.5\Release-NTS-x64" and the library from "$INSTALL_PATH\Libraries\All\Win64" folders.
For PHP 5.6.x 32-bit Thread Safe (TS) take the extension from "$INSTALL_PATH\Extensions\All\5.6\Release-x86" and the library from "$INSTALL_PATH\Libraries\All\Win32" folders.
extension=php_sbb.dll
sbb.license_key=ABCD...