然之协同系统迁移到SAE平台-细节排查

    蝉知和然之系统基本能在SAE平台正常运行,但是还有部分关于文件系统的操作会报权限错误,有部分代码不规范。进行以下几项工作提高然之在SAE平台上的运行稳定性。

1.1、(蝉知)查找mkdir()、fopen()、fclose()函数的使用地方。使用linux的grep命令进行查找。

./system/module/package/model.php:427:                mkdir($downloadPath);

进行了判断不需处理


./system/module/package/model.php:563:                    if(!@mkdir($path, 0755, true))

进行了判断不需处理


./system/module/ui/control.php:106:                if(!is_dir($savePath)) mkdir($savePath, 0755, true);

需要进行判断处理


./system/module/wechat/model.php:116:        if(!is_dir(dirname($qrcodeFile))) @mkdir(dirname($qrcodeFile));

需要进行判断处理


./system/module/file/model.php:302:            @mkdir($savePath, 0777, true);

进行了判断不需处理


./system/module/cache/model.php:24:        if(!is_dir($this->cacheRoot)) mkdir($this->cacheRoot, 0755, true);

功能不了解,暂缓处理


./system/bin/syncext.php:91:        if(!is_dir($targetPath)) mkdir($targetPath, 0755, true);

./system/bin/cn2tw.php:41:    if(!is_dir($extTargetLangPath)) mkdir($extTargetLangPath);
./system/lib/qrcode/qrcode.class.php:2625:                        mkdir(QR_CACHE_DIR.'mask_'.$maskNo);
./system/lib/zfile/zfile.class.php:30:            mkdir($to);
./system/lib/zfile/zfile.class.php:138:    public function mkdir($dir)
./system/lib/zfile/zfile.class.php:140:        return mkdir($dir, 0755, true);
./system/lib/purifier/purifier.class.php:15286:            mkdir($directory, $chmod);
./system/lib/purifier/standalone/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt:45:    if (!is_dir($dir)) mkdir($dir);
./system/lib/pclzip/pclzip.class.php:5026:    if (!@mkdir($p_dir, 0777))
./system/framework/helper.class.php:172:        if(!is_dir($mergedModelDir)) mkdir($mergedModelDir, 0755, true);

相对于tempRoot无需修改

读文件是可以的,重点检查写文件的操作。

./system/module/file/model.php:305:                $fd = @fopen($savePath . DS . 'index.php', "a+");
./system/module/upgrade/model.php:846:            $fd = @fopen($indexFile, "a+");
./system/lib/wechatapi/wechatapi.class.php:594:        $fh = fopen($logFile, 'a+');
./system/lib/phpmailer/phpmailer.class.php:1700:    $fp = fopen('php://temp/', 'r+');
./system/lib/zdb/zdb.class.php:76:        $fp = fopen($fileName, 'w');
./system/lib/purifier/purifier.class.php:8253:        $fh = fopen($file, 'r');
./system/lib/purifier/purifier.class.php:8273:        $fh = fopen($file, 'r');
./system/lib/snoopy/snoopy.class.php:1232: $fp = fopen($file_name, "r");
./system/lib/http/http.class.php:65:        $fh = @fopen($logFile, 'a');
./system/lib/pclzip/pclzip.class.php:1114:      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
./system/lib/pclzip/pclzip.class.php:2203:    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
./system/lib/pclzip/pclzip.class.php:2353:    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
./system/lib/pclzip/pclzip.class.php:2667:        if (($v_file = @fopen($p_filename, "rb")) == 0) {
./system/lib/pclzip/pclzip.class.php:2807:    if (($v_file = @fopen($p_filename, "rb")) == 0) {
./system/lib/pclzip/pclzip.class.php:2841:    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) {
./system/lib/pclzip/pclzip.class.php:2873:    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0)
./system/lib/pclzip/pclzip.class.php:3157:    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
./system/lib/pclzip/pclzip.class.php:3827:          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
./system/lib/pclzip/pclzip.class.php:3900:            if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
./system/lib/pclzip/pclzip.class.php:3972:    if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) {
./system/lib/pclzip/pclzip.class.php:4002:    if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
./system/lib/pclzip/pclzip.class.php:5117:    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
./system/lib/pclzip/pclzip.class.php:5255:    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
./system/framework/router.class.php:1660:        $fh = @fopen($errorFile, 'a');
./system/framework/router.class.php:1722:        $fh = @fopen($sqlLog, 'a');

1.2 (然之)

./app/sys/file/model.php:273:        if(!file_exists($savePath)) @mkdir($savePath, 0777, true);
./lib/qrcode/qrcode.class.php:2626:                        mkdir(QR_CACHE_DIR.'mask_'.$maskNo);
./lib/zfile/zfile.class.php:30:            mkdir($to);
./lib/zfile/zfile.class.php:138:    public function mkdir($dir)
./lib/zfile/zfile.class.php:140:        return mkdir($dir, 0755, true);
./lib/pclzip/pclzip.class.php:5026:    if (!@mkdir($p_dir, 0777))
./framework/helper.class.php:164:        if(!is_dir($app->getTmpRoot() . 'model' . DS)) mkdir($app->getTmpRoot() . 'model' . DS, 0755, true);


./app/sys/schema/model.php:125:        $handle = fopen($this->session->importFile, 'r');
./lib/phpmailer/phpmailer.class.php:1700:    $fp = fopen('php://temp/', 'r+');
./lib/snoopy/snoopy.class.php:1232: $fp = fopen($file_name, "r");
./lib/http/http.class.php:65:        $fh = @fopen($logFile, 'a');
./lib/pclzip/pclzip.class.php:1114:      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
./lib/pclzip/pclzip.class.php:2203:    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
./lib/pclzip/pclzip.class.php:2353:    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
./lib/pclzip/pclzip.class.php:2667:        if (($v_file = @fopen($p_filename, "rb")) == 0) {
./lib/pclzip/pclzip.class.php:2807:    if (($v_file = @fopen($p_filename, "rb")) == 0) {
./lib/pclzip/pclzip.class.php:2841:    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) {
./lib/pclzip/pclzip.class.php:2873:    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0)
./lib/pclzip/pclzip.class.php:3157:    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
./lib/pclzip/pclzip.class.php:3827:          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
./lib/pclzip/pclzip.class.php:3900:            if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
./lib/pclzip/pclzip.class.php:3972:    if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) {
./lib/pclzip/pclzip.class.php:4002:    if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
./lib/pclzip/pclzip.class.php:5117:    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
./lib/pclzip/pclzip.class.php:5255:    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
./framework/router.class.php:1744:        $fh = @fopen($errorFile, 'a');
./framework/router.class.php:1789:        $fh = @fopen($sqlLog, 'a');


2、将所有的代码审查一遍。

补充注释,将内容与原系统做对比。检查修改是否合适。规范代码格式。

SAE平台MySQL不允许使用show database,需要将install/model.php的checkconfig方法进行修改去掉checkDb()的调用。


3、将演示环境更换到SAE的主版本。


4、编写、修改升级文档


5、查看日志文件,修改出现的错误提示


6、添加英文支持,把语言文件的英文文件添加上。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
然之协同管理系统专业版简介 然之协同管理系统由客户管理(crm)、日常办公(oa)、现金记账(cash)、团队分享(team)和应用导航(ips)五大模块组成,主要面向中小团队的企业内部管理。和市面上其他的产品相比,然之协同更专注于提供一体化、精简的解决方案。 然之协同管理系统 v2.4 专业版 更新日志 1、新增考勤明细导入功能 2、ldap导入用户增加和本地帐号关联的功能 3、新增发票管理的功能: 客户增加税务信息操作 在客户和合同列表页面增加发票入口 在客户管理和现金流应用里面增加发票模块 实现发票的申请、编辑、查看,开票、快递、作废、冲红功能 4、完善阿米巴应用的功能: 编辑交易或者查看交易详情时把交易方的信息也显示出来 交易增加搜索功能 增加批量创建交易的功能 浏览阿米巴各模块功能时先检查是否设置了阿米巴部门和科目 阿米巴的组织结构图增加显示级别控制按钮 是否只显示汇总数据记录状态 默认只显示汇总数据报表 阿米巴报表去掉重叠的表格边框 阿米巴报表增加隔行变色功能 阿米巴报表调整颜色呈现 将分摊支出和分配收入合并为规则 调整阿米巴交易导航条的布局 待确认交易列表显示所有月份的数据 重构阿米巴报表中获取工资数据的逻辑 批量创建预算和交易界面增加提示 5、优化细节修复bug: 添加待办时待办类型加上项目任务、订单沟通、客户沟通 开启多级审批时,取消部门经理与其他审批人为同一人时,提示审批人重复的限制 修复进销存应用下产品-仓库,点击仓库报错的问题 修复创建报销时,有上传附件的权限但是不显示附件输入框的问题 修复工作流动作触发条件功能字段值显示异常的问题 修复工作流动作标签拖动无效的问题 修复现金记账报表功能按收入和支出科目统计不显示饼状图的问题 修复然之集成禅道 后无法同步禅道中的任务和bug的问题 移动端客户管理售后模块创建问题增加必填项标识 优化IOS10.2,无网络登录时提示内容 安卓版客户端名称由然之改为然之专业版 补充历史记录对应动作的语言项 然之协同管理系统登录界面 然之协同管理系统后台管理 登录路径:域名//www/sys/index.php 用户与密码:admin(安装时可设置) 后台页面: 相关阅读 同类推荐:站长常用源码

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值