51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2881|回复: 2
打印 上一主题 下一主题

[原创] mantis安装后,访问页面,怎么出现如下的原程序啊

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-10-31 23:05:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
mantis安装后,访问页面,怎么出现如下的原程序啊
请问到底是什么没装好
<?php
        # Mantis - a php based bugtracking system
        # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
        # Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
        # This program is distributed under the terms and conditions of the GPL
        # See the README and LICENSE files for details

        # --------------------------------------------------------
        # $Id: check.php,v 1.22 2005/02/28 14:42:52 thraxisp Exp $
        # --------------------------------------------------------
?>
<?php
        error_reporting( E_ALL );

        $g_skip_open_db = true;  # don't open the database in database_api.php
        require_once ( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );
        require_once ( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core/email_api.php' );

        $t_core_path = config_get_global( 'core_path' );

        $f_mail_test        = gpc_get_bool( 'mail_test' );
        $f_password                = gpc_get_string( 'password', null );

        define( 'BAD', 0 );
        define( 'GOOD', 1 );

        function print_test_result( $p_result ) {
                if ( BAD == $p_result ) {
                        echo '<td bgcolor="#ff0088">BAD</td>';
                }

                if ( GOOD == $p_result ) {
                        echo '<td bgcolor="#00ff88">GOOD</td>';
                }
        }

        function print_yes_no( $p_result ) {
                if ( ( 0 === $p_result ) || ( "no" === strtolower( $p_result ) ) ) {
                        echo 'No';
                }

                if ( ( 1 === $p_result ) || ( "yes" === strtolower( $p_result ) ) ) {
                        echo 'Yes';
                }
        }

        function print_test_row( $p_description, $p_pass )
        {
                echo '<tr>';
                echo '<td bgcolor="#ffffff">';
                echo $p_description;
                echo '</td>';

                if ( $p_pass ) {
                        print_test_result( GOOD );
                } else {
                        print_test_result( BAD );
                }

                echo '</tr>';
        }

        function test_bug_download_threshold()
        {
                $t_pass = true;

                $t_view_threshold = config_get_global( 'view_attachments_threshold' );
                $t_download_threshold = config_get_global( 'download_attachments_threshold' );
                $t_delete_threshold = config_get_global( 'delete_attachments_threshold' );

                if ( $t_view_threshold > $t_download_threshold ) {
                        $t_pass = false;
                } else {
                        if ( $t_download_threshold > $t_delete_threshold ) {
                                $t_pass = false;
                        }
                }

                print_test_row( 'Bug attachments download thresholds (view_attachments_threshold, ' .
                                'download_attachments_threshold, delete_attachments_threshold)', $t_pass );

                return $t_pass;
        }

        function test_bug_attachments_allow_flags()
        {
                $t_pass = true;

                $t_own_view = config_get_global( 'allow_view_own_attachments' );
                $t_own_download = config_get_global( 'allow_download_own_attachments' );
                $t_own_delete = config_get_global( 'allow_delete_own_attachments' );

                if ( ( $t_own_delete == ON ) && ( $t_own_download == FALSE ) ) {
                        $t_pass = false;
                } else {
                        if ( ( $t_own_download == ON ) && ( $t_own_view == OFF ) ) {
                                $t_pass = false;
                        }
                }

                print_test_row( 'Bug attachments allow own flags (allow_view_own_attachments, ' .
                                'allow_download_own_attachments, allow_delete_own_attachments)', $t_pass );

                return $t_pass;
        }

        $version = phpversion();
?>
<html>
<head>
<title> Mantis Administration - Check Installation </title>
<link rel="stylesheet" type="text/css" href="admin.css" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
        <tr class="top-bar">
                <td class="links">
                        [ <a href="index.php">Back to Administration</a> ]
                </td>
                <td class="title">
                        Check Installation
                </td>
        </tr>
</table>
<br /><br />

<?php
        require_once( $g_core_path . 'obsolete.php' );
?>

<!-- Version Check -->
<table width="100%" bgcolor="#0000aa" border="0" cellpadding="20" cellspacing="1">
<tr>
        <td bgcolor="#f0f0ff">
                <span class="title">Version</span>
                <p>Mantis requires at least <b>PHP <?php echo PHP_MIN_VERSION ?></b>.  If you are not running this version or above, you or your administrator will need to upgrade your build of PHP.</p>
                <p>You are running <b>PHP <?php echo $version ?></b></p>
        </td>
</tr>
</table>

<br />

<table width="100%" bgcolor="#222222" border="0" cellpadding="10" cellspacing="1">
<tr>
        <td bgcolor="#e8e8e8" colspan="2">
                <span class="title">Checking your installation</span>
        </td>
</tr>

<!-- Test DATABASE part 1 -->
<tr>
        <td bgcolor="#ffffff">
                Opening connection to database [<?php echo config_get_global( 'database_name' ) ?>] on host [<?php echo config_get_global( 'hostname' ) ?>] with username [<?php echo config_get_global( 'db_username' ) ?>]
        </td>
        <?php
                $result = @db_connect( config_get_global( 'hostname' ), config_get_global( 'db_username' ), config_get_global( 'db_password' ), config_get_global( 'database_name' ) );
                if ( false == $result ) {
                        print_test_result( BAD );
                } else {
                        print_test_result( GOOD );
                }
        ?>
</tr>

<!-- Absolute path check -->
<tr>
        <td bgcolor="#ffffff">
                Checking to see if your absolute_path config option has a trailing slash: "<?php echo config_get_global( 'absolute_path' ) ?>"
        </td>
        <?php
                $t_absolute_path = config_get_global( 'absolute_path' );

                if ( ( "\\" == substr( $t_absolute_path, -1, 1 ) ) ||
                         ( "/"  == substr( $t_absolute_path, -1, 1 ) ) ) {
                        print_test_result( GOOD );
                } else {
                        print_test_result( BAD );
                }
        ?>
</tr>


<?php
# Windows-only checks
if ( substr( php_uname(), 0, 7 ) == 'Windows' ) {
?>
<!-- Email Validation -->
<tr>
        <td bgcolor="#ffffff">
                validate_email = OFF?
        </td>
        <?php
                if ( ON != config_get_global( 'validate_email' ) ) {
                        print_test_result( GOOD );
                } else {
                        print_test_result( BAD );
                }
        ?>
</tr>

<!-- MX Record Checking -->
<tr>
        <td bgcolor="#ffffff">
                check_mx_record = OFF?
        </td>
        <?php
                if ( ON != config_get_global( 'check_mx_record' ) ) {
                        print_test_result( GOOD );
                } else {
                        print_test_result( BAD );
                }
        ?>
</tr>
<?php } # windows-only check ?>



<!-- PHP Setup check -->
<?php
        $t_vars = array( 'magic_quotes_gpc',
                                        'gpc_order',
                                        'variables_order',
                                        'include_path',
                                        'short_open_tag');

        while ( list( $t_foo, $t_var ) = each( $t_vars ) ) {
?>
<tr>
        <td bgcolor="#ffffff">
                <?php echo $t_var ?>
        </td>
        <td bgcolor="#ffffff">
                <?php echo ini_get( $t_var ) ?>
        </td>
</tr>
<?php
        }

        test_bug_download_threshold();
        test_bug_attachments_allow_flags();

                print_test_row( 'check mail configuration: send_reset_password = ON requires allow_blank_email = OFF',
                                ( ( OFF == config_get_global( 'send_reset_password' ) ) || ( OFF == config_get_global( 'allow_blank_email' ) ) ) );
                print_test_row( 'check mail configuration: send_reset_password = ON requires enable_email_notification = ON',
                                ( OFF == config_get_global( 'send_reset_password' ) ) || ( ON == config_get_global( 'enable_email_notification' ) ) );
                print_test_row( 'check mail configuration: allow_signup = ON requires enable_email_notification = ON',
                                ( OFF == config_get_global( 'allow_signup' ) ) || ( ON == config_get_global( 'enable_email_notification' ) ) );
                print_test_row( 'check mail configuration: allow_signup = ON requires send_reset_password = ON',
                                ( OFF == config_get_global( 'allow_signup' ) ) || ( ON == config_get_global( 'send_reset_password' ) ) );
                print_test_row( 'check language configuration: fallback_language is not \'auto\'',
                                'auto' <> config_get_global( 'fallback_language' ) );

                print_test_row( '$g_bug_link_tag is not empty ("' . config_get_global( 'bug_link_tag' ) . '")',
                                '' <> config_get_global( 'bug_link_tag' ) );
                print_test_row( '$g_bugnote_link_tag is not empty ("' . config_get_global( 'bugnote_link_tag' ) . '")',
                                '' <> config_get_global( 'bugnote_link_tag' ) );

                print_test_row( 'filters: dhtml_filters = ON requires use_javascript = ON',
                                ( OFF == config_get_global( 'dhtml_filters' ) ) || ( ON == config_get_global( 'use_javascript' ) ) );
?>
</table>

<!-- register_globals check -->
<?php
        if ( ini_get_bool( 'register_globals' ) ) { ?>
                <br />

                <table width="100%" bgcolor="#222222" border="0" cellpadding="20" cellspacing="1">
                <tr>
                        <td bgcolor="#ffcc22">
                                <span class="title">WARNING - register_globals - WARNING</span><br /><br />

                                You have register_globals enabled in PHP, which is considered a security risk.  Since version 0.18, Mantis has no longer relied on register_globals being enabled.  PHP versions later that 4.2.0 have this option disabled by default.  For more information on the security issues associated with enabling register_globals, see <a href="http://www.php.net/manual/en/security.globals.php">this page</a>.

                                If you have no other PHP applications that rely on register_globals, you should add the line <pre>register_globals = Off</pre> to your php.ini file;  if you do have other applications that require register_globals, you could consider disabling it for your Mantis installation by adding the line <pre>php_value register_globals off</pre> to a <tt>.htaccess</tt> file or a <tt>&lt;Directory&gt;</tt> or <tt>&lt;Location&gt;</tt> block in your apache configuration file.  See the apache documentation if you require more information.
                        </td>
                </tr>
                </table>

                <br /><?php
        }
?>

<!-- login_method check -->
<?php
        if ( CRYPT_FULL_SALT == config_get_global( 'login_method' ) ) { ?>
                <br />

                <table width="100%" bgcolor="#222222" border="0" cellpadding="20" cellspacing="1">
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2005-11-1 17:41:13 | 只看该作者
通过你的描述,不好确认
可以先从你访问页去查(包括include进去的文件),是否是程序错误,比如打开的时候不小删了个字符,导致语法的错误这类问题。
确定以上问题之后再进行别的检查。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2005-11-2 19:44:32 | 只看该作者
已经解决了。是php没有装好。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-13 21:00 , Processed in 0.078323 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表