cakephp:在共享主机上配置cakephp [英] cakephp: configuring cakephp on shared host justhost

查看:132
本文介绍了cakephp:在共享主机上配置cakephp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在justhost上为我的addon域配置cakephp,当我访问www.merryflowers.com/pages/home时,我收到404未找到错误





以下是我在/webroot/index.php和/webroot/test.php中所做的更改

  if(!defined('ROOT')){
define('ROOT',DS.'home'.DS.'xxx' .DS.'public_html');
}
if(!define('APP_DIR')){
define('APP_DIR','merryflowers');
}
if(!defined('CAKE_CORE_INCLUDE_PATH')){
define('CAKE_CORE_INCLUDE_PATH',DS.'home'.DS.'xxx');
}

我需要对.htaccess文件进行一些更改吗?以及.htaccess文件从哪个文件夹?



在public_html / merryflowers.com /我有:
视图,插件和webroot文件夹



谢谢

解决方案

看起来 mod_rewrite 无法正常工作,我可以访问 webroot 目录(http://www.merryflowers.com/webroot/),其中指出找不到core.php 。在查看可能的 mod_rewrite 问题之前,请确保 core.php 已正确包含。<​​/ p>

我不确定你需要设置 index.php 中的所有路径,设置 CAKE_CORE_INCLUDE_PATH 可能就足够了。



您的完整路径不是 DS.'home'.DS.'xxx',但是:



DS.'home'.DS.'xxx'。'public_html'.DS.'merryflowers.com'



您可能要设置 ROOT APP_DIR 到默认值,除非您需要自定义路径。


I tried to configure cakephp on justhost for my addon domain and i'm getting 404 not found error when I go to www.merryflowers.com/pages/home

Can someone please help me out?

The following are the changes I made in /webroot/index.php and /webroot/test.php

if (!defined('ROOT')) {
        define('ROOT', DS.'home'.DS.'xxx'.DS.'public_html'); 
}
if (!defined('APP_DIR')) {
       define('APP_DIR', 'merryflowers'); 
 }
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'xxx');
}

Do I need to make some changes to the .htaccess file? and .htaccess file from which folder?

under public_html/merryflowers.com/ i have: views, plugins and webroot folder

thank you

解决方案

It seems mod_rewrite isn't functioning properly, I can access the webrootdirectory (http://www.merryflowers.com/webroot/), which states that core.php can't be found. Before you look into possible mod_rewrite problems, ensure core.php is properly included.

I'm not sure you need to set all the paths in index.php, setting CAKE_CORE_INCLUDE_PATH might be enough.

You're full path isn't DS.'home'.DS.'xxx', but:

DS.'home'.DS.'xxx'.'public_html'.DS.'merryflowers.com'

You might want to set ROOT and APP_DIR to the default values, unless you need custom paths.

这篇关于cakephp:在共享主机上配置cakephp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆