WordPress.org

Support

Support » Installation » Error with 1.5, IIS, and the “Manage” admin link

Error with 1.5, IIS, and the “Manage” admin link

  • Hello,

    I just installed WP 1.5 on my friend’s server. Unfortunately, he doesn’t use apache but I tried installing it anyway. The first thing that happened was that I could not login. So some searching led me to a site that had a fix for many of the problems with IIS. This was written by a Toby Simmons.

    Anyhow, there appears to be only one thing left, and that is, I cannot access the “Manage” page. Basically, it tells me that the wp-admin\edit.php page cannot be found. I looked on the server and it’s definitely there. I tried all the other links and they appear to work fine.

    I thought maybe it had to do with the call to edit.php, but couldn’t find anything. I’m obviously not much of a php programmer. 🙁 I could definitely use some help if any of you know what to do.

    TIA,
    –Dan

Viewing 15 replies - 1 through 15 (of 25 total)
  • Yeah, I had the same problem. You’re not alone. 🙁

    I am the third person with the problem. Is there somebody with a solution for this problem?

    John

    Well, here’s what I’ve found so far.

    I edited a file called menu.php. That seems to have the menus that control what you select. It includes ‘post’, ‘link-manager’, etc., in addition to ‘edit’. I noticed that if you try going directly to a page, it will take you there. Try logging in, then type http://www.[yourdomain.com]/wp-admin/page-new.php. That will take you directly to the Write Page. You’ll notice that the main menu is on top (starts out “Dashboard Write Manage…”). “Write” is highlighted and under that are the tabs “Write Post” and “Write Page” and you are on “Write Page”. Now, if you enter one that is under ‘control’ of edit.php, try categories.php, you’ll see that the main menu is still there, but there is no sub-menu. You are on the Categories page, but it just doesn’t look correct. I’m assuming you should have an Edit Submenu with all the options listed.

    So my question is: Why is that? Why doesn’t the Edit menu come up? Will someone with a little more WP & PHP knowledge help a poor noob out here? Pretty-please-with-sugar-on-it?

    I’m going to try playing with menu.php and see if I can get it to bring edit up. I’m not sure what else to do. It might have something to do with IIS & variables, but who knows.

    I’ll keep you posted. Thanks for letting me know I’m not the only one out there. 🙂

    –Dan

    Here’s the latest.

    I tracked it down to the line “include(ABSPATH . ‘wp-blog-header.php’);”. For some reason, IIS (I’m assuming) is having a problem with that line. I played around with it a little and finally changed it to “include(‘./wp-blog-header.php’);” This has allowed it to bring up the posts menu.

    The only thing now is that on the Posts tab it tells me ‘No Posts Found’. I’m assuming it should show at least one even if I’ve never put anything in. I guess tomorrow I’ll debug it some more…

    –Dan

    Oh, sorry. I should’ve mentioned in the post above that the “include…” line is in edit.php. Just do a search for wp-blog-header.php.

    –Dan

    hey guys, i just installed 1.5 tonight…what a pain.
    the reason this is showing up is because of wp-blog-header.php.
    it is included in edit.php at line150
    then, starting at line 109 in wp-blog-header.php, it starts mucking with the headers and sends a 404 status to the browser for reasons I do not know. so, for now to get the page functioning, I did this:

    // Sending HTTP headers

    if ( !empty($error) && ‘404’ == $error ) {
    //if ( preg_match(‘/cgi/’, php_sapi_name()) )
    // @header(‘Status: 404 Not Found’);
    //else
    // @header(‘HTTP/1.x 404 Not Found’);
    }/* else */if ( empty($feed) ) {

    I’ll let the pros debug this further…it’s late and time for bed.

    To Dan:
    It works. I can add posts now etc.. That is superb. I don’t know anything about php etc so I look regular on this forum. I changed include(‘./wp-blog-header.php in edit.php. Now I get the message “no posts found”. You mentioned that already. But also “Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\edit.php on line 150

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\edit.php on line 150

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\edit.php on line 150

    Warning: main(): Failed opening ‘./wp-blog-header.php’ for inclusion (include_path=’.;C:\PHP\pear’) in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\edit.php on line 150

    What to do?

    John

    I’ve just installed 1.5 under IIS and hit the exact same problem. The fix is to edit wp-blog-header.php. It is missing a test for EDIT.PHP from an inspection of PATH_INFO and wrongly reporting a 404 back to IIS.

    In wp-blog-header.php change this block starting at line 16:

    if ((isset($_GET['error']) && $_GET['error'] == '404') ||
    ((! empty($_SERVER['PATH_INFO'])) &&
    ('/' != $_SERVER['PATH_INFO']) &&
    (false === strpos($_SERVER['PATH_INFO'], 'index.php'))
    )) {

    and add in this extra line:

    && (false === strpos($_SERVER['PATH_INFO'], 'edit.php'))

    so that the whole thing looks like this (spaces are not important):

    if ((isset($_GET['error']) && $_GET['error'] == '404') ||
    ((! empty($_SERVER['PATH_INFO'])) &&
    ('/' != $_SERVER['PATH_INFO']) &&
    (false === strpos($_SERVER['PATH_INFO'], 'index.php'))
    && (false === strpos($_SERVER['PATH_INFO'], 'edit.php'))
    )) {

    Refresh the edit page and it should all be groovy.

    I was able to fix the 404 problem by commenting out line 24 in wp-blog-header.php:
    // $error = ‘404’;
    They’re assuming a 404 status if something doesn’t work…well something isn’t working for edit.php…

    The rest of my problems were fixed by visiting the Toby Simmons website in the first post.

    -Kevin

    whoops, should have refeshed before posting that. however, i like my solution because i have other pages on my site that use the same header info that the blog does, so i need to be able to include wp-blog-header in other files like i could pre-1.5…

    -Kevin

    Is that your final answer?

    Funnily enough, I ran a fresh test local install of WP1.5 and there were no problems encountered. Will report back to this post if I come across anything.

    Wow! Thanks for all the help.

    I haven’t tried Kevin‘s solution, but I did implement agw‘s and now everything seems to work fine.

    John, be sure to change the include line in edit.php back to “include (ABSPATH . ‘/wp-blog-header.php’);”.

    That should do it. Again, thanks for all your help!

    –Dan

    Thanks Dan and others for all your help. I’m getting close to a good working wp 1.5. There is one more issue. In the manage – files I get the following message:
    Warning: file(c:\domains\weerden.org\wwwroot\logboekgijs/): failed to open stream: Permission denied in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\admin-functions.php on line 908

    Warning: implode(): Bad arguments. in c:\domains\weerden.org\wwwroot\logboekgijs\wp-admin\admin-functions.php on line 908

    What to do?
    John

    John,

    I’m not getting those messages so I’m afraid I’m not going to be of much help. Hopefully someone else with a bit more php and/or IIS experience can lend a hand here. Good luck!

    –Dan

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Error with 1.5, IIS, and the “Manage” admin link’ is closed to new replies.
Skip to toolbar