php - 如何制作 Freeswitch ESL phpmod?

标签 php centos freeswitch

Freeswitch 1.5 安装成功,Fs_cli 运行良好。

我正在使用 Centos 6。我想让 ESL 与 PHP 一起工作。所以我按照 Freeswitch Wiki 中编写的步骤为 PHP 制作 ESL。但它给出了如下错误:

make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -DHAVE_OPENSSL" CXXFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1" CXX_CFLAGS="" -C php
make[1]: Entering directory `/usr/local/src/freeswitch/libs/esl/php'
g++ -I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1  -Wno-unused-label -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
esl_wrap.cpp:741:18: error: zend.h: No such file or directory
esl_wrap.cpp:742:22: error: zend_API.h: No such file or directory
esl_wrap.cpp:743:29: error: zend_exceptions.h: No such file or directory
esl_wrap.cpp:744:17: error: php.h: No such file or directory
esl_wrap.cpp:745:37: error: ext/standard/php_string.h: No such file or directory
esl_wrap.cpp:1093:21: error: php_ini.h: No such file or directory
esl_wrap.cpp:1094:31: error: ext/standard/info.h: No such file or directory
esl_wrap.cpp:803: error: 'E_ERROR' was not declared in this scope
esl_wrap.cpp:824: error: ISO C++ forbids declaration of 'ZEND_RSRC_DTOR_FUNC' with no type
esl_wrap.cpp:824: error: 'SWIG_landfill' was not declared in this scope
esl_wrap.cpp:824: error: expected ',' or ';' before '{' token
esl_wrap.cpp:830: error: variable or field 'SWIG_ZTS_SetPointerZval' declared void
esl_wrap.cpp:830: error: 'zval' was not declared in this scope
esl_wrap.cpp:830: error: 'z' was not declared in this scope
esl_wrap.cpp:830: error: expected primary-expression before 'void'
esl_wrap.cpp:830: error: expected primary-expression before '*' token
esl_wrap.cpp:830: error: 'type' was not declared in this scope
esl_wrap.cpp:830: error: expected primary-expression before 'int'
make[1]: *** [esl_wrap.o] Error 1
make[1]: Leaving directory `/usr/local/src/freeswitch/libs/esl/php'
make: *** [phpmod] Error 2

最佳答案

在freeswitch源码顶层目录重新运行./configure;这将获取相关 PHP header 的位置。然后再次尝试构建 ESL 库。

构建完成后,使用 make phpmod-install 进行安装。

关于php - 如何制作 Freeswitch ESL phpmod?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26611723/

相关文章:

php - 生产环境中的 Doctrine 模式更新错误

mysql - CentOS 6.5 mysql 使用大量内存

amazon-ec2 - FreeSwitch - 我在 Amazon EC2 服务器上听不到声音

c - 自由开关ESL "cannot find -lesl"

用于远程机器的 linux tar 命令

freeswitch - 如何在 freeswitch 上调用本地软电话?

php - echo 打印变量中的 HTML 标签

php - 清理从 PHP 数组转换而来的格式化 JSON

php - PHP 的 MySQL 查询结合两个表中的数据

r - X11 不可用 - Centos