尝试访问数据库时服务器错误PHP

时间:2013-09-07 19:23:36

标签: php mysql codeigniter internal-server-error bluehost

如何阐明此错误消息?我已经在这上花了几个小时。 基本上当我连接到myapp.mysite.org时,我得到它的工作,与myapp.mysite.org/docu和其他页面相同,但是当我需要查询数据库时,我得到了这个神秘的“服务器错误”的东西。关于我如何开始这个的任何提示,我很快就结束了。我怎么能至少有一些错误记录,所以我看到事情失败的地方。

主持Bluehost,Code Igniter app。

配置/ database.php中

$db['test']['hostname'] = 'localhost';
$db['test']['username'] = 'me_name';
$db['test']['password'] = 'me_password';
$db['test']['database'] = 'me_database';
$db['test']['dbdriver'] = 'mysql';
$db['test']['dbprefix'] = '';
$db['test']['pconnect'] = TRUE;
$db['test']['db_debug'] = FALSE;
$db['test']['cache_on'] = FALSE;
$db['test']['cachedir'] = '';
$db['test']['char_set'] = 'utf8';
$db['test']['dbcollat'] = 'utf8_general_ci';
$db['test']['swap_pre'] = '';
$db['test']['autoinit'] = TRUE;
$db['test']['stricton'] = FALSE;

的.htaccess

SetEnv MAGIC_QUOTES 0
SetEnv PHP_VER 5
Options +FollowSymlinks -MultiViews
Options +SymLinksIfOwnerMatch -MultiViews
RewriteEngine On
DirectoryIndex index.php
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule (.*) index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule (.*) index.php?/$1 [L]

日志以DEBUG结束 - 2012-10-05 23:55:41 - >数据库驱动程序类已初始化

1 个答案:

答案 0 :(得分:0)

echo "<pre>";
print_r($this->db);
echo "</pre>";

运行上面的代码检查你的数据库的详细信息,似乎你的htaccess文件没问题 确保您的$active_group输入正确。

相关问题