PHP扩展开发报错解决[error: ‘PHP_FE_END’ undeclared here (not in a function)] .

PHP扩展开发报错解决[error: ‘PHP_FE_END’ undeclared here (not in a function)] .

解决方法:进到php包的目录

sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' ./ext/**/*.c

sed -i 's|ZEND_MOD_END|{NULL,NULL,NULL}|' ./ext/**/*.c
例如:

sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' ./ext/pcntl/*.c

sed -i 's|ZEND_MOD_END|{NULL,NULL,NULL}|' ./ext/pcntl/*.c
然后再编译即可!

你可能感兴趣的:(PHP,扩展,pcntl,PHP_FE_END)