2014-10-28 57 views
1

Freeswitch 1.5已成功安裝,Fs_cli工作正常。如何製作Freeswitch ESL phpmod?

我正在使用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 
+1

你有沒有安裝php devel庫? – 2014-10-28 15:15:09

+0

是的,它已安裝。但仍然出現以上錯誤。讓我知道你是否需要澄清其他事情。 – 2014-10-30 14:53:23

回答

2

重新運行./configure在頂級freeswitch源目錄中;它會提取相關PHP頭文件的位置。然後嘗試再次構建ESL庫。

一旦建成,使用make phpmod-install來安裝它。

+0

我在這張桌子上的桌子上打了我的頭,謝謝。 – 2014-11-09 11:44:44