WordPress.org

Ready to get started?Download WordPress

Forums

New User - Couple Issues after 1st Time IIS Install (11 posts)

  1. ATNO
    Member
    Posted 5 years ago #

    Hi all. This is my first installation of WP. I'm comfortable with editing php and familiar with MySQL

    This is a clean install. Version 2.5.1 Just downloaded this afternoon.
    Installed on IIS 6 Windows 2003 server.
    PHP 5.1.4
    MySQL 4.1.7

    Issue number 1 doesn't seem to be that big of a deal because it's not causing any real problems but in the admin area on some pages for example when editing users at the top of the page there's an error

    Notice: Undefined index: REQUEST_URI in c:\Inetpub\wwwroot\blog\wp-settings.php on line 81

    Apparently that's part of the "Fix for IIS, which doesn't set REQUEST_URI"

    The second issue I have no idea what's causing it or what to do about it because of my unfamiliarity with WP's code. You can see the problem if you visit the new blog install
    http://www.alaron-nuclear.com/blog

    All of the links related to the blog have their path's screwed up. For example if you mouseover the "LogIn" link near the bottom, the path is http://www.alaron-nuclear.com/?step=2/wp-login.php If you click it obviously it 404's as ?step=2 directory doesn't exist and redirects to my company home page which is what I have my server set to do (we host the site ourselves). The same is true of the other links Uncategorized, Edit, 1 Comment, About, May 2008, etc., in effect making the blog unusable.

    I suspected that the correct link to log out (I am logged in as admin in Firefox) was http://www.alaron-nuclear.com/blog/wp-login.php?action=logout Seemed to be the correct assumption but it through up the following error that seems to be related to the same problem with the IIS fix.

    Notice: Undefined index: REQUEST_URI in c:\Inetpub\wwwroot\blog\wp-settings.php on line 81

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-login.php on line 202

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-login.php on line 214

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 570

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 571

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 574

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 575

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 576

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 577

    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\blog\wp-settings.php:81) in c:\Inetpub\wwwroot\blog\wp-includes\pluggable.php on line 690

    This blog is for my company's president so it's important that I get it up and running as quickly as possible. I'm hoping that someone who's done an IIS install knows how to fix this.

    //added note - I am not using IIS mod_rewrite or IIS Isapi_Rewrite

    Thanks
    Mark Bowker
    System Admin
    Alaron Corporation.

  2. ronchicago
    Member
    Posted 5 years ago #

  3. ATNO
    Member
    Posted 5 years ago #

    Thanks for the link but the "headers already sent" problems are caused by the "Notice: Undefined index: REQUEST_URI in in wp-settings.php"

    I did find this post http://wordpress.org/support/topic/164618?replies=36

    According to OTTO it was supposed to have been fixed in 2.5.1 but it doesn't appear to be. I'm having that exact issue.

  4. ATNO
    Member
    Posted 5 years ago #

    I also don't think it's finding my default theme, because I find it incredibly hard to believe the default theme would look as bland as this
    http://www.alaron-nuclear.com/blog/

  5. ATNO
    Member
    Posted 5 years ago #

    I made a small amount of progress with this. Right before line 81 I hard coded the directory where WP resides and it elliminated the Undefined index: REQUEST_URI errors. So the code now looks like

    // Append the query string if it exists and isn't null
    		if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
    		    $_SERVER['REQUEST_URI'] = "blog/";
    			$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
    		}

    I did that because the .= operator was supposed to concatenate something but there was nothing being concatenated. I took a guess and it worked. Then to further troubleshoot, I replaced blog with $_SERVER['PATH_INFO'] and the error returned, but instead of "Undefined index: REQUEST_URI" the error is

    Undefined index: PATH_INFO in c:\Inetpub\wwwroot\blog\wp-settings.php on line 81

    So apparently at that point in the script PATH_INFO is undefined.

    So temporarily I'm leaving it hardcoded as "blog/" To keep that error out of the way.

    Although it cleared up that error, I still have about half the links, both on the index page and in the admin dashboard where the "blog" directory is being replaced with "?step=2" I have no idea where that is coming from, but I'll keep looking.

    And could someone please check my blog link and tell me if that's what a default WP install is supposed to look like? I just am having a hard time believing that's the stock default theme.

  6. ATNO
    Member
    Posted 5 years ago #

    Added note. It also eliminates the error if I use ABSPATH there

    // Append the query string if it exists and isn't null
    		if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
    		    $_SERVER['REQUEST_URI'] = ABSPATH;
    			$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
    		}
  7. ATNO
    Member
    Posted 5 years ago #

    Well, thanks anyway guys, but I got tired of farting around with this trying to get it to work on IIS and not getting any assistance here. So I installed b2evolution instead. It installed perfectly in less time than the "famous five minute install". I left the status of this unresolved because it isn't really. My first choice was WordPress, but I had to get something working. You can close this if you want.

  8. ronchicago
    Member
    Posted 5 years ago #

    glad you found a solution. no that's not the default theme, that's just the db.

  9. MikeHarris
    Member
    Posted 5 years ago #

    Hi All. First post. Just tried to install word press at work for a new project and got the same problem as above. After installation I was told it was successful, however I got the "Notice: Undefined index: REQUEST_URI in D:\sites\mysite.co.uk\www\wordpressblog\wp-settings.php on line 81" php error and when I log in there are no styles at all, just basic markup. Any suggestions would be really helpful. Many thanks, Mike.

  10. MikeHarris
    Member
    Posted 5 years ago #

    OK - Problem solved. Just did a fresh install of 2.3.3 and it all worked fine. Obviously more stable than the newer versions. Thanks anyway guys.

  11. visitkans
    Member
    Posted 5 years ago #

    Got this solution from hours of research in these forums, cant remember who gave this solution, but finally this works for brinkster hosting with windows IIS.

    commented code is old code (wp-settings.php)

    // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
    		if ( isset($_SERVER['ORIG_PATH_INFO']) ) {
    			if ( $_SERVER['ORIG_PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
    				$_SERVER['REQUEST_URI'] = $_SERVER['ORIG_PATH_INFO'];
    			else
    			$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['ORIG_PATH_INFO'];
    		}
    		// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
    		//if ( isset($_SERVER['PATH_INFO']) ) {
    		//	if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
    		//		$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
    		//	else
    		//		$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
    		//}

Topic Closed

This topic has been closed to new replies.

About this Topic