表現:php
/home/sphinx-1.1.0/sphinx.c: In function ‘php_sphinx_client_read_property’:
/home/sphinx-1.1.0/sphinx.c:105:2: error: too few arguments to function ‘std_hnd->read_property’
/home/sphinx-1.1.0/sphinx.c: In function ‘zim_SphinxClient_updateAttributes’:
/home/sphinx-1.1.0/sphinx.c:1040:6: warning: passing argument 2 of ‘memset’ makes integer from pointer without a cast [enabled by default]
/usr/include/x86_64-linux-gnu/bits/string3.h:77:1: note: expected ‘int’ but argument is of type ‘void *’
/home/sphinx-1.1.0/sphinx.c: In function ‘zm_startup_sphinx’:
/home/sphinx-1.1.0/sphinx.c:1888:43: warning: assignment from incompatible pointer type [enabled by default]linux
sphinx-1.1.0/sphinx.c:105:2: error: too few arguments服務器
解決spa
以前在PHP 5.2.16以及5.3.17環境下安裝PECL擴展sphinx-1.1.0時,均成功.但今日在PHP 5.4.10環境下.net
安裝sphinx-1.1.0時,卻遇到錯誤.開發
遇到的錯誤在PHP官網上做爲bug由其餘使用者反應了,見源碼
https://bugs.php.net/bug.php?id=61241string
解決方式:it
1.來自PHP開發人員tony2001@php.net的回覆,在SVN發佈的PHP更新源碼中進行了修復.io
回覆時間是: 2012-06-12 19:17 UTC
由於所使用的PHP是採用服務器系統安裝的,所以此方式不適合.
2.參照回覆者andrew at cbtech dot co dot uk的回覆,對sphinx-1.1.0的源碼修改,再進行編譯安裝.
下面是其回覆內容:
If you change line 105 of sphinx.c from:
retval = std_hnd->read_property(object, member, type TSRMLS_CC);
to
retval = std_hnd->read_property(object, member, type TSRMLS_CC, NULL);
it compiles and seems to work.
編輯安裝方式簡單描述: