After more digging, I've managed to get rid of the open base dir error
(comment out open_basedir setting in php.ini)

Now I have another issue...

Under Apache, the following code:
<?php echo Router::url("/user_muses/foo.jpg"/>

produces the following output:

/app/webroot/user_muses/foo.jpg

Under IIS, it breaks because the output is:

/index.php/app/webroot/user_muses/foo.jpg

And the images are broken.

Note: This only happens when I use Router::url(). If I use the built
in $html->image() to display images the urls are correct.

Obviously, I can't use $html->image() in this case as the images are
stored in a different location.

I get a similar problem when I try an embed a flash application too.

How do I remove index.php from the urls on IIS?

On Aug 26, 5:23 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
> After a bit of struggling, I've managed to get a CakePHP app running
> on IIS.
>
> I've running it without mod_rewrite so I followed the instructions in
> core.php and removed .htaccess files and uncommented the line:
>
>         Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>
> I've installed my cake app into:
>
> c:\Inetpub\php_test\
>
> I'm getting an error in a couple of places in my code, along the lines
> of:
>
> Warning (2): file_exists() [function.file-exists]: open_basedir
> restriction in effect. File(/index.php/app/webroot/user_backgrounds/
> 1.xml) is not within the allowed path(s): (c:\Inetpub) [APP\views
> \elements\painter.ctp, line 133]
>
> Reading a bit further I've made the changes to /app/webroot/index.php
>
> /**
>  * The full path to the directory which holds "app", WITHOUT a
> trailing DS.
>  *
>  */
>         if (!defined('ROOT')) {
>                 define('ROOT', "\\Inetpub\\php_test");
>         }
> /**
>  * The actual directory name for the "app".
>  *
>  */
>         if (!defined('APP_DIR')) {
>                 define('APP_DIR', "\\Inetpub\\php_test\\app\\");
>         }
> /**
>  * The absolute path to the "cake" directory, WITHOUT a trailing DS.
>  *
>  */
>         if (!defined('CAKE_CORE_INCLUDE_PATH')) {
>                 define('CAKE_CORE_INCLUDE_PATH', "\\Inetpub\\php_test");
>         }
>
> What am I missing/doing wrong?
>
> Thanks in advance :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to