问题描述
我一直在本地网站(WAMP)上工作,并且100%有效。现在,我正在尝试将其在线存储在客户端的Dreamhost服务器上,这给了我5天的困扰。
I have been working on a site locally (WAMP) and it's worked 100%. Now I'm trying to put it online on the client's Dreamhost server and it's been giving me 5 days of problems.
但是,在index.php页面上,它显示为:
However, on the index.php page, it reads:
一个错误遇到
无法找到您指定的模型:设置
服务器的结构为:
- 家庭
- 用户
- domain1.com
- 应用程序/
- 系统/
- index.php
.htaccess:
.htaccess:
Options +FollowSymLinks AuthType Basic AuthName "Restricted Access" AuthUserFile "/home/user/domain1.com/.htpasswd" Require valid-user RewriteEngine On RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ RewriteRule ^(.*)$ - [E=BASE:%1] RewriteBase /home/user/domain1.com RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ %{ENV:BASE}/index.php?/$1 [L,QSA]
在config.php中,我的
base_url
是:In config.php, my
base_url
is:$ config ['base_url'] ='domain1.com';
调用未找到的设置模型的位置位于GoCart的application / controllers / Bootstrap.php文件中,位于第143行附近。读取
And the place where the unfound Settings model is being called is located in GoCart's application/controllers/Bootstrap.php file around line 143. It reads
//autoload some libraries here. $this->load->model('Settings'); $this->load->library(['session', 'auth', 'form_validation']); $this->load->helper(['file', 'string', 'html', 'language', 'form', 'formatting']);
因为我使用的是GoCart CMS,Settings.php不在models文件夹中,但是在应用程序/模块/设置/模型中。
Because I am using the GoCart CMS, Settings.php is not in the models folder, but it is in application/modules/settings/models.
这是我所能提供的唯一信息。我不确定本地版本和网络版本之间出了什么问题,但是我发现了很多有关Dreamhost的文章和论坛帖子,它们引起了CodeIgniter的问题。我认为它可以与CodeIgniter一起使用,但是现在GoCart引起了一些问题,不幸的是,GoCart的记录不如CodeIgniter(因此,很难找到答案)。
That's about the only info I can provide. I'm not sure what's going wrong between the local version and the web version, but I've found a lot of articles and forum posts about Dreamhost causing issues with CodeIgniter. I think it works with CodeIgniter, but now GoCart is causing some issue, and GoCart unfortunately is not as documented as CodeIgniter (so answers are harder to find).
有什么想法吗?
推荐答案
供以后参考:GoCart CMS创建一个清单文件(application / config / manifest.php),该文件将覆盖其他路线和文档它使用的所有控制器的URL。显然,当您在本地服务器上安装GoCart时,它将设置文件的本地路径,并且这些路径已在Web服务器上使用。我删除了manifest.php,然后GoCart重写了一个新文件。现在可以了!
For future reference: GoCart CMS creates a manifest file (application/config/manifest.php) which overrides other routes and documents the URLs of all the controllers it uses. Apparently, when you install GoCart on a local server, it sets up local paths to the files and these were being used on the web server. I deleted manifest.php and GoCart rewrote a new one. Now it works!
这篇关于Codeigniter + GoCart CMS + Dreamhost(共享主机)说“无法找到您指定的模型...”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- domain1.com
- 用户