Page 1 of 1

.13 on IIS on XP error

Posted: Wed Jun 21, 2006 6:40 am
by thestormdragon
Hi

New install of 0.13 running on Win XP, SP2 (IIS 5.1) with mySQL 4.1.20

Installation worked happily but get this error at the top of the page:

Notice: Undefined index: QUERY_STRING in C:\Inetpub\wwwroot\index.php on line 41

Clicking on any link just produces a page cannot be found error and I think it's something to do with the URL processing as the link is

http://127.0.0.1/index.php/content_types

when I think it should be

http://127.0.0.1/index.php?page=content_types

Any ideas?

Thanks in advance

David

Re: .13 on IIS on XP error

Posted: Sat Jun 24, 2006 12:57 pm
by Elijah Lofgren
Hmm... IIS must not treat content_types as a query string in URLs like this (I'm guessing Apache does):
http://127.0.0.1/index.php/content_types

If you want to just use URLs like this:
http://127.0.0.1/index.php?page=content_types

Open config.php and change this line:

Code: Select all

$config['internal_pretty_urls'] = true;
to:

Code: Select all

$config['internal_pretty_urls'] = false;
And I just noticed that in the comments above that line it says "This will not work with IIS", so I guess this is a known problem.

internal_pretty_urls will be turned off by default in future versions of CMSMS.

Hope this helps,

Elijah

Re: .13 on IIS on XP error

Posted: Wed Jun 28, 2006 2:09 am
by thestormdragon
Hi Elijah

Firstly, thanks for your help - making that change has fixed 99.99% of the fault!

All pages / links etc now work without any problem apart from:

http://127.0.0.1  when I still get exactly the same error (Notice: Undefined index: QUERY_STRING in C:\Inetpub\wwwroot\index.php on line 41)

However, if I click the home link (which has the URL http://127.0.0.1/index.php?page=home) then the error doesn't appear.

And yes, I did clear the cache!!

Thanks again

David

Re: .13 on IIS on XP error

Posted: Wed Jun 28, 2006 4:03 pm
by Elijah Lofgren
thestormdragon wrote: Hi Elijah

Firstly, thanks for your help - making that change has fixed 99.99% of the fault!

All pages / links etc now work without any problem apart from:

http://127.0.0.1  when I still get exactly the same error (Notice: Undefined index: QUERY_STRING in C:\Inetpub\wwwroot\index.php on line 41)

However, if I click the home link (which has the URL http://127.0.0.1/index.php?page=home) then the error doesn't appear.
It looks like this has been fixed in the SVN version (unreleased, CMSMS-1.0-svn).

In index.php, try finding this:

Code: Select all

if (!isset($_SERVER['REQUEST_URI']))
{
	$_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}
and replacing it with this:

Code: Select all

if (!isset($_SERVER['REQUEST_URI']) && isset($_SERVER['QUERY_STRING']))
{
	$_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}

That will probably fix your problem.  ;)


Edit: fixed code quotes.

Re: .13 on IIS on XP error

Posted: Thu Jun 29, 2006 3:10 am
by thestormdragon
Hi Elijah

What a star!  It all works perfectly now.

Many thanks once again

David