- User ID
- 1
- Joined
- 7 Jan 2019
- Messages
- 943
- Reaction score
- 40
- Points
- 28
If you want to add any extra modules to PHP, they'll most likely need to be compiled in. Any module that needs to be compiled in will have a --with-gmp type flag which will need to be used.
Which simply means that the \ character was not correctly added on the line before --with-gmp.
- First, figure out which configure file your system is using. Type:
Bash:cd /usr/local/directadmin/custombuild ./build used_configs | grep configure.php
Code:PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/fpm/configure.php72
- To add this flag, run the following:
Bash:cd /usr/local/directadmin/custombuild mkdir -p custom/fpm cp -fp configure/fpm/configure.php72 custom/fpm/configure.php72
- Add your --with-gmp line to the end of the custom/fpm/configure.php72 file, and make sure the \ character exists at the end of all lines except the last one. The \ character tells the line configure line to loop to the next line, making the configure settings easier to read. Without the \ character to trigger the wrap, the next line becomes a separate command, which is not correct. (see error below). Once set, type:
Bash:./build php n
If you're using suphp, the paths would be configure/suphp/configure.php5 and custom/suphp/configure.php5.- If you get the following error message:
Code:
configure: error: Unable to locate gmp.h
- Check if the following file is exist:
Code:
/usr/include/x86_64-linux-gnu/gmp.h
Code:sudo apt-get install libgmp-dev
- If you get the following error message:
- Restart apache:
RedHat:
Bash:/sbin/service httpd restart
Bash:/usr/local/etc/rc.d/httpd restart
Code:
/usr/local/directadmin/custombuild/custom/fpm/configure.php72: line 36: --with-gmp: command not found