Ubuntu11.10 安装SCA_SDO

 1.下载SCA_SDO-1.2.4.tgz

wget http://pecl.php.net/get/SCA_SDO-1.2.4.tgz

2.安装SCA_SDO扩展
tar zxf SCA_SDO-1.2.4.tgz
cd SCA_SDO-1.2.4
执行  /usr/bin/phpize命令

./configure --with-php-config=/usr/bin/php-config
make
这时会报错

错误一:

/root/tools/SCA_SDO-1.2.4/sdo.cpp:263: error: multiple storage classes
in declaration of 'arginfo_sdo_model_type_identifier'
/root/tools/SCA_SDO-1.2.4/sdo.cpp:325: error: multiple storage classes
in declaration of 'arginfo_sdo_model_reflectiondataobject_export'
make: *** [sdo.lo] Error 1
ERROR: `make' failed

解决办法:

将 /root/tools/SCA_SDO-1.2.4/sdo.cpp (除了static char rcs_id[])所有的 static 全>部删掉
 
 
root@dell-desktop:~/tools/SCA_SDO-1.2.4# cat sdo.cpp |grep ^static
static char rcs_id[] = "$Id: sdo.cpp,v 1.15 2006/09/29 15:04:22 cem Exp $";
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_dataobject, 0)
static ZEND_BEGIN_ARG_INFO(arginfo___get, 0)
static ZEND_BEGIN_ARG_INFO(arginfo___set, 0)
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_dataobject_createdataobject, 0)
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_sequence_getproperty, 0)
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_sequence_move, 0)
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_sequence_insert, 0, ZEND_RETURN_VALUE, 1)
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_list_insert, 0, ZEND_RETURN_VALUE, 1)
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_datafactory_create, 0)
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_das_datafactory_addType, 0, ZEND_RETURN_VALUE, 2)
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_das_datafactory_addPropertyToType, 0, ZEND_RETURN_VALUE, 5)
static ZEND_BEGIN_ARG_INFO(arginfo_sdo_model_type_identifier, 0)
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_model_reflectiondataobject_export, 0, ZEND_RETURN_VALUE, 1)
static zend_module_dep sdo_deps[] = {
上面列出的是所有含static的行,将(除了static char rcs_id[])所有的static删除,然后再make
 
########################################################
 
问题二:
make: *** [commonj/sdo/SDODataConverter.lo] Error 1
解决办法:
修改 /root/tools/SCA_SDO-1.2.4/commonj/sdo/SDODataConverter.cpp

#include <string.h>
#include "commonj/sdo/SDODataConverter.h"
#include "commonj/sdo/SDORuntimeException.h"
前加入:
#include <cstdio>
#include <cstdlib>

然后再 编译安装
make install
 
#########################################################
3.拷贝文件
mkdir /usr/share/php/SDO
cp -r SCA  /usr/share/php       ##php默认安装位置为 /usr/share/php/
cp -r DAS  /usr/share/php/SDO/
chmod -R 755 /usr/share/php/SCA
chmod -R 755 /usr/share/php/SDO/DAS


4.编辑/etc/php5/apache2/php.ini

找到extension_dir 去掉前面的注释符号
extension_dir= "/usr/lib/php5/20090626/" #路径/usr/lib/php5/20090626/是你的sdo.so文件的存放路径
然后在文件末尾添加extension = sdo.so

进入目录/etc/php5/cli/conf.d/
#cp gd.ini  sdo.ini
#vim sdo.ini
extension=gd.so  修改为  extension=sdo.so  保存退出。
重启web服务。运行phpinfo.php 此时可看到 sdo 模块已经加载
 

你可能感兴趣的:(Ubuntu11.10,安装SCA_SDO)