Step1: phpize run error
[root@gadmobe ~]# /usr/local/php-fpm/bin/phpize
Cannot find config.m4.
Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module
Step2: done!
#Go to the php source code directory
cd /usr/local/src/php-5.6.30/ext/
#Execution
./ext_skel --extname=my_module
#goto my_module
cd /usr/local/src/php-5.6.30/ext/my_module
#edit
vim config.m4
#
dnl PHP_ARG_WITH(my_module, for my_module support,
dnl Make sure that the comment is aligned:
dnl [ --with-my_module Include my_module support])
#modify to
PHP_ARG_WITH(my_module, for my_module support,
Make sure that the comment is aligned:
[ --with-my_module Include my_module support])
vim /usr/local/src/php-5.6.30/ext/my_module.c
#
/* {{{ my_module_functions[]
*
* Every user visible function must have an entry in my_module_functions[].
*/
const zend_function_entry my_module_functions[] = {
PHP_FE(confirm_my_module_compiled, NULL) /* For testing, remove later. */
PHP_FE_END /* Must be the last line in my_module_functions[] */
};
#modify to
/* {{{ my_module_functions[]
*
* Every user visible function must have an entry in my_module_functions[].
*/
const zend_function_entry my_module_functions[] = {
PHP_FE(say_hello, NULL) /* ?Add a line of code */
PHP_FE(confirm_my_module_compiled, NULL) /* For testing, remove later. */
{NULL, NULL, NULL} /* Must be the last line in my_module_functions[] */
};
Similar Posts:
- Can’t find PHP headers in /usr/include/php The php-devel package is required for use of this command.
- PHP: using Zend to encrypt the source code, Zend guard installation and Zend guard run time support missing
- [Solved] PHP Fatal error: Class ‘mysqli’ not found in xxx
- [Solved] Webpack4 output configuration filename chunkash error
- C++ Error: passing ” “as” ” discards qualifiers
- incorrect integer value for column [How to Solve]
- [Solved] Operator overload must take either zero or one argument error
- Cannot find module ‘../lib/utils/unsupported.js’
- How to Solve PHP error “Zend”_ mm_ heap corrupted”
- Python: How to Modify AD Password