in dispatcher.php on line 387:
$webroot = setUri();
// $htaccess =
preg_replace('/(?:'.APP_DIR.'\\/(.*)|index\
\.php(.*))/i', '', $webroot).APP_DIR.'/'.$webrootDirName.'/';
$htaccess = "/".$webrootDirName.'/';
If I replace line 388 with the line below like above I don't have to
hack html.php and it return the right path to the css, image, icon.
<link rel="icon" href="/cakecms/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/cakecms/favicon.ico" type="image/x-
icon" />
<link rel="stylesheet" type="text/css" href="/cakecms/css/
cake.generic.css" />
These are what I got in the header now!
It seems that the line 387 and 388 fail to do something right when
mod_rewrite is off.
On Jun 25, 8:33 am, "chanh.ong" <[EMAIL PROTECTED]> wrote:
> My config are: XAMPP and running WXP.
>
> Note: I moved the content of app/webroot into the same level as app so
> now my cake structure will look like this:
> H:.
> ├───app
> │ ├───config
> │ │ └───sql
> │ ├───controllers
> │ │ └───components
> │ ├───models
> │ ├───plugins
> │ ├───tmp
> │ │ ├───cache
> │ │ │ ├───models
> │ │ │ ├───persistent
> │ │ │ └───views
> │ │ ├───logs
> │ │ ├───sessions
> │ │ └───tests
> │ ├───vendors
> │ └───views
> │ ├───elements
> │ ├───errors
> │ ├───helpers
> │ ├───layouts
> │ └───pages
> ├───cake
> │ ├───config
> │ ├───libs
> │ │ ├───controller
> │ │ │ └───components
> │ │ │ ├───dbacl
> │ │ │ │ └───models
> │ │ │ └───iniacl
> │ │ ├───model
> │ │ │ ├───datasources
> │ │ │ └───dbo
> │ │ └───view
> │ │ ├───helpers
> │ │ └───templates
> │ │ ├───elements
> │ │ ├───errors
> │ │ ├───layouts
> │ │ ├───pages
> │ │ └───scaffolds
> │ └───scripts
> │ └───templates
> │ ├───skel
> │ │ ├───config
> │ │ │ └───sql
> │ │ ├───controllers
> │ │ │ └───components
> │ │ ├───models
> │ │ │ └───behaviors
> │ │ ├───plugins
> │ │ ├───tmp
> │ │ │ ├───cache
> │ │ │ │ ├───models
> │ │ │ │ ├───persistent
> │ │ │ │ └───views
> │ │ │ ├───logs
> │ │ │ ├───sessions
> │ │ │ └───tests
> │ │ ├───vendors
> │ │ ├───views
> │ │ │ ├───elements
> │ │ │ ├───errors
> │ │ │ ├───helpers
> │ │ │ ├───layouts
> │ │ │ └───pages
> │ │ └───webroot
> │ │ ├───css
> │ │ ├───files
> │ │ ├───img
> │ │ └───js
> │ └───views
> ├───css
> ├───docs
> ├───files
> ├───img
> ├───js
> └───vendors
>
> These are my path setup:
> ROOT=H:\dev\htdocs\cakecms
> APP_DIR=app
> WEBROOT_DIR=cakecms
> WWW_ROOT=H:\dev\htdocs\cakecms\cakecms\
> CAKE_CORE_INCLUDE_PATH=H:\dev\htdocs\cakecms
> CORE_PATH=H:\dev\htdocs\cakecms\
> APP_PATH=H:\dev\htdocs\cakecms\app\
>
> Without the hack:
> <link rel="icon" href="/cakecms/app/cakecms/favicon.ico" type="image/x-
> icon" />
> <link rel="shortcut icon" href="/cakecms/app/cakecms/favicon.ico"
> type="image/x-icon" />
> <link rel="stylesheet" type="text/css" href="/cakecms/app/cakecms/css/
> cake.generic.css" /></head>
>
> With the hack:
> <link rel="icon" href="/cakecms/app/cakecms/favicon.ico" type="image/x-
> icon" />
> <link rel="shortcut icon" href="/cakecms/app/cakecms/favicon.ico"
> type="image/x-icon" />
> <link rel="stylesheet" type="text/css" href="css/cake.generic.css" /></
> head>
>
> I forgot to mention the $this->webroot return a wrong value too!
>
> I tried my hack with or without mod_rewrite and it works in both
> cases. I am having a tough time trying to figure out why $this->webroot
> return a wrong value too! I might have to hack the
>
> dispatcher to fix that! Not sure yet!
>
> Thanks
>
> On Jun 24, 11:11 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > I would recommend you do not go modifying the core like this. If
> > $this->webroot is being set to an incorrect value this most likely
> > indicates an error in your setup and configuration - it is preferable
> > to find this issue and fix it than to make a change like you have.
>
> > Can you please give examples of the urls generated before and after
> > your modification, and any other details about your setup (folder
> > paths etc).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---