0

我没有使用 Tsodeigniter,但现在有一个工作站点是另一个主机。一旦你运行它,你就会得到:address : 95.87.255.162只是等待,Apache 日志文件中没有加载任何内容。我的设置配置文件是:

$ Active_group = 'default';
$ Active_record = TRUE;

$ Db ['default'] ['hostname'] = 'localhost';
$ Db ['default'] ['username'] = 'MYUSER';
$ Db ['default'] ['password'] = 'MYPASS';
$ Db ['default'] ['database'] = 'MYDATABASE';
$ Db ['default'] ['dbdriver'] = 'mysqli';
$ Db ['default'] ['dbprefix'] ='';
$ Db ['default'] ['pconnect'] = FALSE;
$ Db ['default'] ['db_debug'] = FALSE;
$ Db ['default'] ['cache_on'] = FALSE;
$ Db ['default'] ['cachedir'] ='';
$ Db ['default'] ['char_set'] = 'utf8';
$ Db ['default'] ['dbcollat'] = 'utf8_general_ci';
$ Db ['default'] ['swap_pre'] ='';
$ Db ['default'] ['autoinit'] = TRUE;
$ Db ['default'] ['stricton'] = FALSE;

(MYUSER, MADATABASE, MYPASS)是真实的。但是,如果网站加载了这些东西中的一些错误但只是启动和其他静态页面,那些记录为“页面”的数据库打不开,就会报404。在错误的数据中给base和更改 $ db ['default'] ['db_debug'] = TRUE;

给出错误:

Error reading the database.
Unable to connect to your database server using the provided settings.
Filename: core / Loader.php
Line Number: 268

如果 (MYUSER, MADATABASE, MYPASS) 正确并更改localhost127.0.0.1. 因为我什么也没写error_logaccess_log只得到:

xxx.xxx.xxx.xxx - [03/Jun/2013: 07:01:03 0300] "GET / en / home HTTP/1.1" 200 -
My system is centos, php 5.1.6 mysql 5.1, codeigniter 2.0.3
4

2 回答 2

0

在我的 /application/log/{date} 之后出现了 DEBUG:

DEBUG - 2013-06-03 21:21:30 --> Config Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Hooks Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Utf8 Class Initialized
DEBUG - 2013-06-03 21:21:30 --> UTF-8 Support Enabled
DEBUG - 2013-06-03 21:21:30 --> URI Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Router Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Output Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Security Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Input Class Initialized
DEBUG - 2013-06-03 21:21:30 --> CRSF cookie Set
DEBUG - 2013-06-03 21:21:30 --> Global POST and COOKIE data sanitized
DEBUG - 2013-06-03 21:21:30 --> Language Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/lang.php
DEBUG - 2013-06-03 21:21:30 --> Loader Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/machina.php
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: common_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: url_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: form_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: html_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: markdown_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: language_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: string_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: date_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: widget_helper
DEBUG - 2013-06-03 21:21:30 --> Language file loaded: language/english/general_lang.php
DEBUG - 2013-06-03 21:21:30 --> Database Driver Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Session Class Initialized
DEBUG - 2013-06-03 21:21:30 --> A session cookie was not found.
DEBUG - 2013-06-03 21:21:30 --> Session routines successfully run
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/ion_auth.php
DEBUG - 2013-06-03 21:21:30 --> Email Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Session class already loaded. Second attempt ignored.
DEBUG - 2013-06-03 21:21:30 --> Language file loaded: language/english/ion_auth_lang.php
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: cookie_helper
DEBUG - 2013-06-03 21:21:30 --> Session class already loaded. Second attempt ignored.
DEBUG - 2013-06-03 21:21:30 --> Carabiner: Library initialized.
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/carabiner.php
DEBUG - 2013-06-03 21:21:30 --> Carabiner: config loaded from config file.
DEBUG - 2013-06-03 21:21:30 --> Carabiner: library configured.
DEBUG - 2013-06-03 21:21:30 --> Simple ACL library initialized
DEBUG - 2013-06-03 21:21:30 --> Controller Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
于 2013-06-03T18:24:49.410 回答
0

codeigniter 2.0.3 ,尝试将 mysql 驱动程序从 mysqli 更改为 mysql。在您的数据库配置中,将 debug 设置为 true 看看会发生什么,然后在 application/logs/{date}.php 中打开您的 codeigniter 日志文件

我不知道这是否是一个错误,因为我以前遇到过这个问题,当使用 mysqli 驱动程序配置我的站点时,站点运行缓慢。我还没有在公共托管中测试过。

于 2013-06-03T04:26:31.250 回答