Innovate faster and cut risk with PHP experts from Zend Services.
Beginning to advanced PHP classes to learn and earn global certification.
Help me choose >
Submit support requests and browse self-service resources.
While we are on the subject of build processes and before we go deeper into building a PHP extension skeleton, it makes sense to explain how to rebuild the extension for production when it’s ready. Actually, you may try this right now. At first, you’ll need PHP development tools especially for your PHP build. It may be a system package.
Installation for Ubuntu/Debian:
$ sudo apt-get install php-dev
Installation for RedHat/Fedora:
$ sudo dnf install php-devel
For Zend Server you should get “php-dev-zend-server” package installed (through Zend Server installer or system package manager) and use its components in the PATH.
$ export PATH=/usr/local/zend/bin:$PATH
The building is very similar to the “DEBUG” build. The difference is that now we use “phpize” from “production” build. (PATH shouldn’t include our DEBUG PHP build directory.)
$ sudo make install
Add extension into php.ini:
$ vi /etc/php.ini
Add the following line:
Check that extension is loaded and works:
$ php -m | grep test
Now you can restart your web server or PHP-FPM and start using your extension in a web environment.
Request PDF Version