On Feb 15, 11:04 am, MissYeh <[email protected]> wrote:
> It seems that the script is unaware what value DS is, it should be a slash.
>
> Is the following code present in the webroot/index.php file before line 52?
>
>         if (!defined('DS')) {
>                 define('DS', DIRECTORY_SEPARATOR);
>         }

I was playing around with .htaccess and depend on
how I set it gives me the same error or infinite loop of redirecting.
Here is the whole source for webroot/index.php and the content of each
htaccess files are also attach at bottom

if (!defined('WEBROOT_DIR')) {
                define('WEBROOT_DIR', basename(dirname(__FILE__)));
        }
        if (!defined('WWW_ROOT')) {
                define('WWW_ROOT', dirname(__FILE__) . DS);
        }
        if (!defined('CORE_PATH')) {
                if (function_exists('ini_set') && ini_set('include_path',
CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS .
PATH_SEPARATOR . ini_get('include_path'))) {
                        define('APP_PATH', null);
                        define('CORE_PATH', null);
                } else {
                        define('APP_PATH', ROOT . DS . APP_DIR . DS);
                        define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
                }
        }
        if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
                trigger_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 " . DS . "cake core directory and your
" . DS . "vendors root directory.", E_USER_ERROR);
        }
        if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
                return;
        } else {
        //echo Configure::version();

                $Dispatcher = new Dispatcher();
                $Dispatcher->dispatch($url);

        }
        if (Configure::read() > 0) {
                echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";



currently I have
root
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase    /
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

app/
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    /webroot/    [L]
    RewriteRule    (.*) /webroot/$1    [L]
 </IfModule>
app/webroot/
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
</IfModule>

and in httpd.conf i have subfolder "dev" as DocumentRoot
and all files ( including cake, app folders ) for cakephp are in this
folder

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to