Yet another IIS + PHP5 error
Yet another IIS + PHP5 error
As a happy camper I just installed cmsms Version 0.11.1
My server is a Win2000Server SP4 fully patched, IIS5, PHP 5.1.1, MySQL 4.1
The installation went by smoothly, only issue SITEDOWN manually removed.
Now I try to access the default site and I get this :
Notice: Undefined index: REQUEST_URI in E:\cms.doktorgren.dk\index.php on line 24
Please help/hints/etc if possible, I'm a newbie at cmsms (duh!) and also at PHP, have been coding ASP for last 5 yrs.
For PHP setup see http://cms.doktorgren.dk/info.php
For error see http://cms.doktorgren.dk
Thanks for any help you might provide.
Cheers,
Mark
My server is a Win2000Server SP4 fully patched, IIS5, PHP 5.1.1, MySQL 4.1
The installation went by smoothly, only issue SITEDOWN manually removed.
Now I try to access the default site and I get this :
Notice: Undefined index: REQUEST_URI in E:\cms.doktorgren.dk\index.php on line 24
Please help/hints/etc if possible, I'm a newbie at cmsms (duh!) and also at PHP, have been coding ASP for last 5 yrs.
For PHP setup see http://cms.doktorgren.dk/info.php
For error see http://cms.doktorgren.dk
Thanks for any help you might provide.
Cheers,
Mark
Re: Yet another IIS + PHP5 error
http://nl2.php.net/reserved.variables
eustf at hotmail dot com
21-Jul-2005 05:05
REQUEST_URI not defined on Windows XP and IIS 5.1
I have seen different script on the web and in this list but they don't work fully. This one seems to work:
if(!isset($_SERVER['REQUEST_URI'])) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = "/" . $arr[count($arr)-1];
if ($_SERVER['argv'][0]!="")
$_SERVER['REQUEST_URI'] .= "?" . $_SERVER['argv'][0];
}
purplebz at hotmail dot com
19-Jun-2005 10:35
How to get $_SERVER['REQUEST_URI'] on IIS (WinXP):
if ( empty($_SERVER['REQUEST_URI']) ) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = $arr[count($arr)-1];
}
josh,endquote,com
04-Dec-2003 12:54
Running PHP 4.3 under IIS 5 on Windows XP, there is no $_SERVER['REQUEST_URI'] variable. This seems to fix it:
if(!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = substr($_SERVER['argv'][0], strpos($_SERVER['argv'][0], ';') + 1);
}
eustf at hotmail dot com
21-Jul-2005 05:05
REQUEST_URI not defined on Windows XP and IIS 5.1
I have seen different script on the web and in this list but they don't work fully. This one seems to work:
if(!isset($_SERVER['REQUEST_URI'])) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = "/" . $arr[count($arr)-1];
if ($_SERVER['argv'][0]!="")
$_SERVER['REQUEST_URI'] .= "?" . $_SERVER['argv'][0];
}
purplebz at hotmail dot com
19-Jun-2005 10:35
How to get $_SERVER['REQUEST_URI'] on IIS (WinXP):
if ( empty($_SERVER['REQUEST_URI']) ) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = $arr[count($arr)-1];
}
josh,endquote,com
04-Dec-2003 12:54
Running PHP 4.3 under IIS 5 on Windows XP, there is no $_SERVER['REQUEST_URI'] variable. This seems to fix it:
if(!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = substr($_SERVER['argv'][0], strpos($_SERVER['argv'][0], ';') + 1);
}
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!
CMSMS rules!
Now they call it Joomla, but it still sucks!
CMSMS rules!
Re: Yet another IIS + PHP5 error

Thx,
Mark
Re: Yet another IIS + PHP5 error
And so he tried to do it anyways...bjaergager wrote:So can you help me how to implement one of those snippets ??
Thx,
Mark
In include.php I found the fix, lin 188, and pasted your top example, now I got these errors:
Notice: Undefined index: REQUEST_URI in E:\cms.doktorgren.dk\index.php on line 24
Notice: Undefined offset: 0 in E:\cms.doktorgren.dk\include.php on line 197
Anyone ?
Cheers,
Mark
Re: Yet another IIS + PHP5 error
I would report it as a bug (not really true, I would throw windows out and use a decent os).bjaergager wrote: So can you help me how to implement one of those snippets ??
Go to http://dev.cmsmadesimple.org/tracker/?a ... unc=browse and report it please.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!
CMSMS rules!
Now they call it Joomla, but it still sucks!
CMSMS rules!
Re: Yet another IIS + PHP5 error
petert wrote:I would report it as a bug (not really true, I would throw windows out and use a decent os).bjaergager wrote: So can you help me how to implement one of those snippets ??
Go to http://dev.cmsmadesimple.org/tracker/?a ... unc=browse and report it please.

Thx anyways
Re: Yet another IIS + PHP5 error - Downgraded to PHP 4.4.1
OK, so I thought I might try to downgrade to PHP4, from what I read, that works like a charm !
Not
After installing php4.4.1, the result is.... well, the same.
Any bidders as to why this wont work on IIS, from what I read it should be able to work using php4, do I need a earlier version of php4 ?
phpinfo : http://cms.doktorgren.dk/info.php
site : http://cms.doktorgren.dk
Thanks for any help!
Cheers,
Mark
Not

Any bidders as to why this wont work on IIS, from what I read it should be able to work using php4, do I need a earlier version of php4 ?
phpinfo : http://cms.doktorgren.dk/info.php
site : http://cms.doktorgren.dk
Thanks for any help!
Cheers,
Mark
Re: Yet another IIS + PHP5 error - Downgraded to PHP 4.4.1
Why did you do that?bjaergager wrote: OK, so I thought I might try to downgrade to PHP4, from what I read, that works like a charm !
NotAfter installing php4.4.1, the result is.... well, the same.
Didn't you read:
Code: Select all
REQUEST_URI not defined on Windows XP and IIS 5.1
it's an iis problem, not a php problem.bjaergager wrote: Any bidders as to why this wont work on IIS, from what I read it should be able to work using php4, do I need a earlier version of php4 ?
phpinfo : http://cms.doktorgren.dk/info.php
site : http://cms.doktorgren.dk
Thanks for any help!
Cheers,
Mark
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!
CMSMS rules!
Now they call it Joomla, but it still sucks!
CMSMS rules!
Re: Yet another IIS + PHP5 error - Downgraded to PHP 4.4.1
I guess I had to try something, so I had a go using php4, I have read posts where there's a lot of problems using php5, wasn't sure if this could help.!petert wrote:Why did you do that?bjaergager wrote: OK, so I thought I might try to downgrade to PHP4, from what I read, that works like a charm !
NotAfter installing php4.4.1, the result is.... well, the same.
Didn't you read:Code: Select all
REQUEST_URI not defined on Windows XP and IIS 5.1
it's an iis problem, not a php problem.bjaergager wrote: Any bidders as to why this wont work on IIS, from what I read it should be able to work using php4, do I need a earlier version of php4 ?
phpinfo : http://cms.doktorgren.dk/info.php
site : http://cms.doktorgren.dk
Thanks for any help!
Cheers,
Mark
Thanks for your reply.
Cheers,Mark
Re: Yet another IIS + PHP5 error
Hey Mark
I had the exact same problem you had. I don't know if you've solved it but I surprisingly got it to work. What I did was:
1) Edited the index.php file on the root directory, I changed the code as below: (Those are actually the first lines of the code. I just added a script to get the REQUEST_URI variable before requesting it in line 24. See?
require_once(dirname(__FILE__).'/fileloc.php');
$log =& LoggerManager::getLogger('index.php');
-------------------------------------------------------------------that's the script I inserted-------------------
if ( empty($_SERVER['REQUEST_URI']) ) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = $arr[count($arr)-1];
}
---------------------------------------------------------------------------------------------------------------------------
$log->info('Serving URL:' . $_SERVER['REQUEST_URI']);
$log->debug('Starting index.php');
apparently, it's all working now. Let me know if you succeeded too, ok?!
Cheers
Fabiana
I had the exact same problem you had. I don't know if you've solved it but I surprisingly got it to work. What I did was:
1) Edited the index.php file on the root directory, I changed the code as below: (Those are actually the first lines of the code. I just added a script to get the REQUEST_URI variable before requesting it in line 24. See?
require_once(dirname(__FILE__).'/fileloc.php');
$log =& LoggerManager::getLogger('index.php');
-------------------------------------------------------------------that's the script I inserted-------------------
if ( empty($_SERVER['REQUEST_URI']) ) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = $arr[count($arr)-1];
}
---------------------------------------------------------------------------------------------------------------------------
$log->info('Serving URL:' . $_SERVER['REQUEST_URI']);
$log->debug('Starting index.php');
apparently, it's all working now. Let me know if you succeeded too, ok?!
Cheers
Fabiana
Re: Yet another IIS + PHP5 error
Nice to see you got it fixed.Fabiana wrote: I had the exact same problem you had. I don't know if you've solved it but I surprisingly got it to work. What I did was:
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!
CMSMS rules!
Now they call it Joomla, but it still sucks!
CMSMS rules!