K9 通用版 博客版 主题版 地方门户版 企业版 |   企业(ASP) 分类 使用 分享 疑问 模板 建议 帮助 错误 其他
+新建主题 [Ajax]
填写帐号密码即可完成注册
+新建话题 最新回复排序 最新主题排序 精华帖子

(急)代码导致APACHE直接死掉

1Next >

webgm 发表于:11-07-04 21:28 [添加收藏] 楼主 [回复] #Top#
webgm 人气:40 积分:18 金币:385
比如我建立了一个 模型

{King:Portal.ndysj}

自定义分类字段2个
大类  aaa          下拉列表  ” a1 a2 a3“
小类  bbb          多选字段 "b1 b2 b3 b4 b5 b6 b7 b8 b9 b10"

然后这个模型应用到多个栏目

而现在要实现一种查询
aaa与bbb的值通过url get传递,

{King:Portal.ndysj where="aaa=(GET:aaa/) and bbb=(GET:bbb/)"}

{/King:Portal.ndysj}

但是
有一个问题,就是(GET:bbb/)不一定存在。

所以要用PHP进行判断。

<?php
$s1="{GET:s1/}";           //获得大类
$s2="{GET:s2/}";

//因为大类是始终存在的,所以只需要一条循环判断
if ($s2!=""){
echo '{King:Portal.ndysj listid=(listid/) where="aaa='.$s1.' and bbb='.$s2.'"}';
} else {
echo '{King:Portal.ndysj listid=(listid/) where="aaa='.$s1.'"}';
}
?>
{King:title/}
{/King:Portal.ndysj}

这样为什么不行?

webgm 发表于:11-07-04 21:40 沙发 [回复] #Top#
webgm 人气:40 积分:18 金币:385
(急)代码导致APACHE直接死掉[图1]

加入这个代码,APACHE就会卡死
61.242.159.* 发表于:11-07-04 21:42 板凳 [回复] #Top#
KingCMS官方网站网友
看日志有什么提示。
webgm 发表于:11-07-04 21:49 4楼 [回复] #Top#
webgm 人气:40 积分:18 金币:385
[Mon Jul 04 21:46:07 2011] [notice] Child 4800: Child process is running
[Mon Jul 04 21:46:07 2011] [notice] Child 4800: Acquired the start mutex.
[Mon Jul 04 21:46:07 2011] [notice] Child 4800: Starting 250 worker threads.
[Mon Jul 04 21:46:07 2011] [notice] Child 4800: Starting thread to listen on port 80.
[Mon Jul 04 21:46:52 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Jul 04 21:46:52 2011] [notice] Child 4800: Exit event signaled. Child process is ending.
[Mon Jul 04 21:46:53 2011] [notice] Child 4800: Released the start mutex
[Mon Jul 04 21:46:54 2011] [notice] Child 4800: Waiting for 250 worker threads to exit.
[Mon Jul 04 21:46:54 2011] [notice] Child 4800: All worker threads have exited.
[Mon Jul 04 21:46:59 2011] [notice] Child 4800: Child process is exiting
[Mon Jul 04 21:46:59 2011] [notice] Parent: Child process exited successfully.

没有其他提示,应该直接是APACHE进程死掉。

我个人认为是这个模板解析模块导致的问题。
解析PHP代码与KING标签冲突了导致的。

可能是导致死循环、内存溢出等。
wushulinghua 发表于:11-07-05 16:10 5楼 [回复] #Top#
wushulinghua 人气:0 积分:609 金币:190
。。。。天书呀
wanglovek 发表于:11-07-05 17:20 6楼 [回复] #Top#
wanglovek 人气:16 积分:10 金币:230
相当不错

1Next >

发表回复

帐号 匿名发布 审核后可见 [加载完整在线编辑器]
内容
验证码
KingCMS 内容管理系统

关于我们 联系我们 广告报价 付款方式 站点导航

Copyright © 2004-2015 Focuznet All rights reserved.

广州唯众网络科技有限公司 粤ICP备08008106号