Thanks barduck I'm impressed by the amount of help that available on this forum - it's good to see something so well supported
Anyway, I've found my problem, and as we both suspected - nothing to do with cake, but IIS I neglected to uncheck the 'check that file exists' box in the application extensions mapping dialog in IIS So, as you say, it checked that the file existed first, which generated the error before invoking php So, now unchecked - everything works fine Hope this helps some others struggling with IIS On Mar 20, 2:34 pm, "barduck" <[EMAIL PROTECTED]> wrote: > This is not Cake or PHP problem but how web servers generally work and > serve URLs. > > When you request "http://localhost/cake/app/index.php?/posts/index", > the web server knows that you are looking for the document "index.php" > under directory "/cake/app/" with the parameter "/posts/index". IIS > knows that in order to serve "index.php", it needs to invoke the PHP > ISAPI and pass handling of the request to it. > > If you omit the "?" and just write "http://localhost/cake/app/ > index.php/posts/index" IIS looks for the default (configurable, > "index.html", "index.htm" etc by default) document under "/cake/app/ > index.php/posts/index/", which of course doesn't exist, so no PHP/Cake > is being invoked and you get the "not found" error. > > There is no way to do what you want without URL rewriting before IIS > handles the request. There is an ISAPI filter that does it quite well, > look at:http://www.isapirewrite.com/ > > It is very similar to mod rewrite on Apache. There is a free lite > version that should satisfy your needs on development environment. > > Hope this helps. > - barduck > > On Mar 18, 1:39 pm, "david" <[EMAIL PROTECTED]> wrote: > > > > > I seen loads of posts about the problems with IIS, but I didn't spot > > anything that relates exactly to my problem (so maybe it's not a cake > > problem - but IIS) - maybe there is an existing post - and I just > > don't know what to search for! (in which case I do apologise in > > advance) > > > Basically, I can't run any rewrite dll's, so wanted to try the options > > without it > > I'm using php as ISAPI > > The only php settings I've changed are the extensionpath, and > > uncommented the extensions for mysql > > I've gone through the basic tutorial > > I'm using PHP 5 > > Cake 1.1.13.4450 > > > So, to the problem > > > By adding > > define ('SERVER_IIS', true); > > and > > define ('BASE_URL', env('SCRIPT_NAME').'?'); > > > I can gethttp://localhost/cake/app/index.php?/posts/index > > working (and links from that page work also) > > > but if i omit the '?', I just get page cannot be found > > > I did try > > define ('BASE_URL', env('SCRIPT_NAME')); > > > But if i omit the '?' in the url, I still get page cannot be found - > > it still shows the initial page if I put the '?' back in the url as > > before, but now links from that page don't work (the links miss the > > '?' out) > > > Have I missed a setting from IIS or PHP that cake needs? > > > Also, why do I have to put the 'app' part in also? - if I just > > usehttp://localhost/cake/index.php?/posts/index > > It stays on the home page- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---