您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

SAE 上安装 Wecenter 错误问题处理

2025/1/7 21:57:01发布17次查看
下面我们一起来看一篇关于sae 上安装 wecenter 错误问题处理例子,希望这篇文章能够帮助到各位朋友。
今天其实想搭建个社区,专门为 zephir/phalcon/yaf/docker/swoole 建设一个社区, 专门为 c 语言的php框架和 c 语言扩展做一个,刚开始挺高兴的,直接用 wecenter 搭建多好,而且官网说支持 sae,我就信心满满的去了,结果不行,坑爹呀,新浪那么大字,mysql 不支持 host:port 没看吗? 稍微修改一下就可以了。
0x01
修改 system\zend\db\adapter\mysqli.php ,搜索找到 // suppress connection warnings here. ,然后在上边加入以下代码:
代码如下 复制代码
  //修复sae上连接错误 bug add by widuu 2015/4/23
    if (defined('in_sae')){
        $host = $this->_config['host'];
        $this->_config['host'] = strstr($host,':',true);
        $port = trim(strstr($host,':'),':');
    }
    // end by widuu
修改 system\zend\db\adapter\pdo\abstract.php,搜索一下代码:
 代码如下 复制代码
return $this->_pdotype . ':' . implode(';', $dsn);
然后替换成如下这样:
 代码如下 复制代码
//修复sae上连接错误 bug add by widuu 2015/4/23
if (defined('in_sae')){
     $host = $dsn['host'];
     $dsn['host'] = strstr($host,':',true);
     $dsn['port'] = 'port='.trim(strstr($host,':'),':');
}
// end by widuu
return $this->_pdotype . ':' . implode(';', $dsn);
0x02
伪静态不管用,大哥你知道吗,最好看看官方的 api,然后伪静态变成如下就可以了:
name: 你的应用名称
version: 你的版本
handle:
 代码如下 复制代码
- rewrite: if (!-d && !-f) goto /index.php?%{query_string}
好就到这里,明天预告,更新 phalcon 的东西,我也想更新 yaf 的知识,当然一个一个慢慢来。然后是 zephir。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product