9 Answers
wget http://pecl.php.net/get/dbase-5.1.0.tgz
tar xzf dbase-5.1.0
cd dbase-5.1.0
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
cd /usr/local/php/lib/php/extensions
ls #看到no-debug-non-zts-20131226类似文件夹
cd no-debug-non-zts-20131226
ls #查看有没有 dbase.so
vi /usr/local/php/etc/php.ini
找到extension = "imagick.so"类似,下面添加一行
extension = "dbase.so
还是不行咯。
和pecl install dbase一样的提示:
make: *** [dbase.lo] Error 1
ERROR: `make' failed
系统是
Linux iZ23zctjmkaZ 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.2.1511 (Core)
PHP是7.0.2
和pecl install dbase一样的提示:
make: *** [dbase.lo] Error 1
ERROR: `make' failed
系统是
Linux iZ23zctjmkaZ 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.2.1511 (Core)
PHP是7.0.2
错误从这里开始:
/root/dbase-5.1.0/dbase.c:856:6: warning: assignment makes pointer from integer without a cast [enabled by default]
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
^
/root/dbase-5.1.0/dbase.c:872:51: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
add_assoc_string(row, "name", cur_f->db_fname, 1);
^
/root/dbase-5.1.0/dbase.c:872:3: error: 'add_assoc_string' undeclared (first use in this function)
add_assoc_string(row, "name", cur_f->db_fname, 1);
/root/dbase-5.1.0/dbase.c:856:6: warning: assignment makes pointer from integer without a cast [enabled by default]
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
^
/root/dbase-5.1.0/dbase.c:872:51: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
add_assoc_string(row, "name", cur_f->db_fname, 1);
^
/root/dbase-5.1.0/dbase.c:872:3: error: 'add_assoc_string' undeclared (first use in this function)
add_assoc_string(row, "name", cur_f->db_fname, 1);
/tmp/pear/temp/dbase/dbase.c:856: warning: assignment makes pointer from integer without a cast
/tmp/pear/temp/dbase/dbase.c:872:51: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:872: error: 'add_assoc_string' undeclared (first use in this function)
/tmp/pear/temp/dbase/dbase.c:876:58: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:877:53: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:878:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:879:55: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:880:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:881:53: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:882:54: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:883:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:900:54: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
make: *** [dbase.lo] Error 1
ERROR: `make' failed
/tmp/pear/temp/dbase/dbase.c:872:51: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:872: error: 'add_assoc_string' undeclared (first use in this function)
/tmp/pear/temp/dbase/dbase.c:876:58: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:877:53: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:878:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:879:55: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:880:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:881:53: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:882:54: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:883:56: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/tmp/pear/temp/dbase/dbase.c:900:54: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
make: *** [dbase.lo] Error 1
ERROR: `make' failed
谢谢。回复。没有。最后一次就是5.1.0,2012年更新的。
看官方文档,默认支持的?
http://php.net/manual/en/function.dbase-open.php
(PHP 4, PHP 5, PHP 7)
dbase_open — Opens a database
Please login or Register to submit your answer