[英]database.php not found in cakephp setup
I'm new to cakePHP, and I'm trying to make it works under linux mint. 我是CakePHP的新手,并且正在尝试使其在Linux Mint下工作。
I'have followed the cakephp website tutorial, but when I get to the database section I get this two warning on my page : 我已经遵循了cakephp网站教程,但是当我进入数据库部分时,在页面上得到了两个警告:
Warning (2): include_once(/var/www/projects/app/Config/database.php)
[function.include-once]: failed to open stream: No such file or directory
[CORE/Cake/Model/ConnectionManager.php, line 67]
Warning (2): include_once() [function.include]:
Failed opening '/var/www/projects/app/Config/database.php'
for inclusion
(include_path='/var/www/projects/lib:.:/usr/share/php:/usr/share/pear')
[CORE/Cake/Model/ConnectionManager.php, line 67]
And I can't get how to fix them. 而且我不知道如何解决它们。
But my database.php still is not found when I check /localhost/myProject 但是当我检查/ localhost / myProject时仍然找不到我的database.php
You are in the wrong folder. 您在错误的文件夹中。 Always navigate to your APP dir and call the cake console relativly from there
始终导航到您的APP目录并从那里相对地调用Cake Console
cd c:\\wamp\\www\\project\\app\\ and execute the command in this folder cd c:\\ wamp \\ www \\ project \\ app \\并在此文件夹中执行命令
\\Console\\cake [command] \\ Console \\ cake [命令]
在目录/ var / www / projects / app / Config /中找到文件database.php.default并将此文件重命名为database.php
Please check your .htaccess files, It should be like this : 请检查您的.htaccess文件,它应该是这样的:
In your projects(root) folder : 在您的项目(根)文件夹中:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
In your projects/app folder : 在您的项目/应用文件夹中:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
In your projects/app/webroot folder : 在您的projects / app / webroot文件夹中:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Hope, this may help you. 希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.