gpt4 book ai didi

cakephp - 如何在 CentOS 上部署 CakePHP 应用程序?

转载 作者:行者123 更新时间:2023-12-04 19:33:25 24 4
gpt4 key购买 nike

我几乎设法在 CentOS 服务器上部署了一个 CakePHP 应用程序,但它仍然需要很少的配置。我在/etc/httpd/conf/httpd.conf 中启用了 mod_rewrite 并重新启动了 apache-server。

然后我把 Cake 核心库放在/home/user/cakephp-core/

当我尝试通过网络浏览器访问此页面时,我收到消息“500 内部错误”。

在 apache-logs 中,我发现了以下消息:

PHP Warning:  include(/$HOME/cakephp-core/lib/Cake/bootstrap.php): failed to open stream: Permission denied in /srv/www/site/public_html/main/index.php on line 96
PHP Warning: include(): Failed opening '/$HOME/cakephp-core/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /srv/www/site/public_html/main/index.php on line 96
PHP Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /srv/www/site/public_html/main/index.php on line 101

它说的是“权限被拒绝”......我应该给谁权限以及在哪里?我把“apache:apache”给了 tmp/-folder……有什么想法吗?

最佳答案

只需阅读日志并尝试理解它。

它非常清楚地告诉您什么权限不足。 linux设置权限的命令是chmod。正如本文已经告诉您的那样,您还想确保您的 CakePHP 核心包含路径是正确的。仔细检查一下。

关于cakephp - 如何在 CentOS 上部署 CakePHP 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17571700/

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