gpt4 book ai didi

php - 更新 CakePHP - 在此服务器上找不到请求的 URL

转载 作者:可可西里 更新时间:2023-10-31 23:50:32 25 4
gpt4 key购买 nike

为傻瓜安装 CAKEPHP

如果您像我一样,会对 Ruby on Rails 和 CakePHP 等框架感到沮丧,尽管启动缓慢,但它们 promise 可以快速开发 - 只需花费数小时进行安装。

要让 CakePHP 运行起来,扔掉教程,甚至不必费心购买书籍或阅读文档。他们都没有提到要做到这一点,但这是在 Mac 10.6.2 上需要做的:

1) Install CakePHP to Sites and unzip it. Rename it to your application name.
2) Now your httpd.conf file can be located anywhere on your mac. Each tutorial assumes it's located at some place in the depths of virtual reality. But in reality all you need to do is use the handy unix command locate from the terminal: locate httpd.conf
4) Then whip out your editor: mate httpd.conf
5) make sure your DocumentRoot says this: DocumentRoot "/Library/WebServer/Documents"
6) make sure under Directory it says AllowOveride All and Allow from all. It should have this by default but you never know when your sister randomly screws with your computer. Just be glad you have a mac and don't have to deal with her infesting your computer with viruses.
7) Obviously you want the php module uncommented: LoadModule php5_module libexec/apache2/libphp5.so
8) Now if you're like me, you dont want to type http://localhost/~jmerlino/mysite. You want to type http://localhost/mysite. So launch the hosts file. Again all you have to do is locate /etc/hosts and then mate /etc/hosts, assuming you're using TextMate. If you're using BBEdit, then obviously you won't be using the mate command.
9) Add this line: 127.0.0.1 localhost/mysite. This allows you to now use http://localhost/mysite.
10) Now the crazy part. find yur username.conf. For me, it's /etc/apache2/users/username.conf. For you, you do locate and make sure it's same spot.
11) Add the following:
<VirtualHost *:80>
ServerName localhost/sitename
DocumentRoot "/Users/username/Sites/"
</VirtualHost>
12) Don't put username. Put whatever your user name is.
13) Then run your app off http://localhost/mysite.
14) Don't forget to sudo apachectl restart when you're finished.

如果您还有问题,并不意味着您应该放弃编程并成为一名管道清洁工。继续努力吧。请记住,您不会在一个在线教程中找到解决方案。

最佳答案

我建议您按照 bakery 中的安装说明进行操作并从 this 设置博客。也看看这个 ticket .

关于php - 更新 CakePHP - 在此服务器上找不到请求的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4001627/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com