在 xampp 上安装 cake php
我在运行 XP 的笔记本电脑上安装了 xampp,并且它已经运行了很长时间没有任何问题。
我刚刚尝试安装 cakephp,并更改了数据库配置并启用了 mod_rewrite。
但现在我在欢迎页面上看到以下内容:
您的 tmp 目录是可写的。
FileEngine 正在用于 缓存。 更改配置编辑 APP/config/core.php
您的数据库配置文件是 存在。
Cake 无法连接到 数据库。
我不知道为什么它没有连接到数据库。 有其他人遇到过这个问题并且知道如何解决它吗?
*编辑有关在蛋糕中配置数据记录的建议也会有很大帮助
I've got xampp installed on my laptop runing XP, and it's been running without any problems for ages.
I've just tried installing cakephp, and have altered the database config and enabled mod_rewrite.
But now I get the following on the welcome page:
Your tmp directory is writable.
The FileEngine is being used for
caching. To change the config edit
APP/config/core.phpYour database configuration file is
present.Cake is NOT able to connect to the
database.
I have no idea why it's not connecting to the database. Has anyone else ever come across this problem and have any idea how to resolve it?
*edit Advice on configuring datalogging in cake would be a great help too
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,编辑
~/app/config/core.php
并将 debug 提高到 2,这将为您提供更详细的错误报告。其次,三次检查您的
~/app/config/database.php
并 110% 确定其中没有拼写错误。 如果没有拼写错误,请尝试使用非蛋糕脚本连接相同的数据。如果也失败了,您可能需要检查 Apache 和 MySQL 日志文件,甚至您的防火墙(如果有的话)。
First, edit
~/app/config/core.php
and raise debug to 2, this will give you more detailed error reporting.Second, triple check your
~/app/config/database.php
and be 110% sure there is no typo in there. If there is no typo, try connecting with that same data with a non-cake script.If that fails too, you might want to check Apache and MySQL log files, or even your firewall if you have one.
当使用 phpmyadmin 添加 phpcake 的用户进行连接时,我必须将主机设置为
localhost
而不是%
。When using phpmyadmin to add a user for phpcake to connect with I had to set the host to
localhost
instead of%
.你检查一下你的数据库用户名和密码是否正确?
还要确保您的数据库确实存在。
以下是XAMPP使用的默认用户名和密码(实际上没有密码):
Have you checked if your database user name and password is correct?
Also ensure that your database does exist.
The following is the default username and password (actually, no password) XAMPP uses: