Chinaunix首页 | 论坛 | 博客
  • 博客访问: 392102
  • 博文数量: 95
  • 博客积分: 3020
  • 博客等级: 中校
  • 技术积分: 865
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-20 10:40
文章分类

全部博文(95)

文章存档

2011年(3)

2010年(8)

2009年(24)

2008年(60)

我的朋友

分类: 项目管理

2009-03-26 10:03:45

在家里安装Mantis时一切都正常。但在公司安装时碰到了几个问题:
   wamp我安装在D盘根目录下,mantis放在wamp的www文件夹下。
  
问题一:创建新用户时不能由到邮件:
提示:APPLICATION ERROR #401
ERROR: Database query failed.    错误
解决的办法:
 
在wamp中查找config_inc.php文件:并用写字板打开;
config_inc.php部分显示:
 

<?php
    # detailed comments.
    # --- database variables ---------
    # set these values to match your setup
    $g_hostname = "localhost";
    $g_db_username = "mantisdbuser";
    $g_db_password = "";
    $g_database_name = "bugtracker";
    $g_db_type = "mysql";
    # --- email variables -------------
    $g_administrator_email = 'administrator@example.com';
    $g_webmaster_email = 'webmaster@example.com';
    # the "From: " field in emails
    $g_from_email = 'noreply@example.com';
    # the return address for bounced mail
    $g_return_path_email = ;

    $g_allow_file_upload    = ON;
     
?>

把该文件修改成:

    # --- database variables ---------

    # set these values to match your setup
    $g_hostname = "localhost";
    $g_db_username = "root";
    $g_db_password = "";
    $g_database_name = "bugtracker";
       $g_debug_email = OFF;
       $g_enable_email_notification= ON;//默认为on,放这里是为了说明如何禁止邮件提醒,禁止邮件提醒后,用户不能注册,新建用户为空密码;

       $g_phpMailer_method=2; //选择发送方式,0 - mail(), 1 - sendmail 2 - SMTP. Default is 0;
       $g_smtp_host = 'smtp.126.com';
       $g_smtp_username = '***_qiau'; //邮件的用户名
       $g_smtp_password = '****123';//邮件的用户密码
       $g_email_padding_length = 1; //具体不知道干嘛,但是默认情况下我的系统竟然连续发送N封邮件,改小了就好了;

    # --- email variables -------------
    $g_administrator_email = 'administrator@example.com';
    $g_webmaster_email = ; //左下角邮箱地址的更改;

    # the "From: " field in emails
    $g_from_email = 'Leyan_qiau@126.com';

    # the return address for bounced mail
    $g_return_path_email = 'Leyan_qiau@126.com';

    # --- file upload settings --------
       $g_allow_file_upload    = ON;
       $g_default_language= 'chinese_simplified';//新增用户默认语言为中文;
      $g_use_phpMailer = ON;
     //$g_show_realname='on'; //显示真实姓名,只有在页面左上方;
?>

问题二:点击mantis--查看Issue--编号00001修改Issue后,点更新时提示:

在公司时操作提示:

APPLICATION ERROR #200
A required parameter to this page was not found.
 
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section. 

在家里操作提示:

APPLICATION ERROR #401
Database query failed. Error received from database was #1054: Unknown column 'p.field_id' in 'on clause' for the query: SELECT f.name, f.type, f.access_level_r, f.default_value, f.type, s.value
FROM mantis_custom_field_project_table AS p, mantis_custom_field_table AS f
LEFT JOIN mantis_custom_field_string_table AS s
ON p.field_id=s.field_id AND s.bug_id='1'
WHERE p.project_id = '1' AND p.field_id = f.id
ORDER BY p.sequence ASC, f.name ASC
 
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

句语没错,是MYSQL的BUG,因为MYsql5.0要把联合的表用括号包含起来才行:

修改成:

SELECT f.name, f.type, f.access_level_r, f.default_value, f.type, s.value
FROM (mantis_custom_field_project_table AS p, mantis_custom_field_table AS f)             //加了一对括号
LEFT JOIN mantis_custom_field_string_table AS s
ON p.field_id=s.field_id AND s.bug_id='1'
WHERE p.project_id = '1' AND p.field_id = f.id
ORDER BY p.sequence ASC, f.name ASC

在MYSQL控制器里可以执行成功。但目前的问题是这条语句是Mantis自动生成的,我试着更新了MYSQL但与wamp不兼容。wamp启动报错。还在解决之中。。。

谢谢KLX网友,我这个问题按照你的方法已解决。

问题三:如何把Mantis里显示的时间改为系统默认时间:
解决的办法:找到mantis下的config_inc.php文件,用写字板打开,添加
putenv("TZ=Asia/Shanghai");   就OK了。
阅读(6333) | 评论(3) | 转发(0) |
0

上一篇:Mantis安装(2)

下一篇:关联Action的对象库

给主人留下些什么吧!~~

chinaunix网友2009-11-04 18:37:33

我的遇到的问题是:添加注释,然后提交,提示:APPLICATION ERROR #401 Database query failed。其它没有任何信息,请问怎么解决?谢谢

klx2009-03-29 16:10:17

给你一个mantis官方网站,有问题可以到这上面看看 http://www.mantisbt.org/bugs/view.php?id=6394

klx2009-03-29 16:05:27

修改你的mantis源码,这条sql在"core/custom_field_api.php" line 754,你找到这个SQL并加上括号即可能,如果其它类似错误,找到源文件修改即可解决