WordPress.org

Ready to get started?Download WordPress

Forums

Error with 1.5, IIS, and the "Manage" admin link (26 posts)

  1. dannyka
    Member
    Posted 9 years ago #

    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

  2. martinc
    Member
    Posted 9 years ago #

    Yeah, I had the same problem. You're not alone. :-(

  3. jowe48
    Member
    Posted 9 years ago #

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

    John

  4. dannyka
    Member
    Posted 9 years ago #

    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

  5. dannyka
    Member
    Posted 9 years ago #

    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

  6. dannyka
    Member
    Posted 9 years ago #

    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

  7. jacobskp
    Member
    Posted 9 years ago #

    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.

  8. jowe48
    Member
    Posted 9 years ago #

    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

  9. agw
    Member
    Posted 9 years ago #

    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.

  10. jacobskp
    Member
    Posted 9 years ago #

    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

  11. jacobskp
    Member
    Posted 9 years ago #

    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

  12. martinc
    Member
    Posted 9 years ago #

    Is that your final answer?

  13. martinc
    Member
    Posted 9 years ago #

    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.

  14. dannyka
    Member
    Posted 9 years ago #

    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

  15. jowe48
    Member
    Posted 9 years ago #

    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

  16. dannyka
    Member
    Posted 9 years ago #

    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

  17. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Here is the official fix. It will be included in 1.5.1. You can replace your existing wp-blog-header.php with this version to pick up the fix.

  18. Sherman
    Member
    Posted 9 years ago #

    John,
    I have those same error messages, so you are not alone. Hopefully, we'll get that one figured out also.

  19. sacrifice
    Member
    Posted 9 years ago #

    The fix posted by Ryan worked on my site that I had this same issue with. no error msgs. Now WP works perfectly - Thanks

  20. nickdominguez
    Member
    Posted 9 years ago #

    Thanks Ryan, the fix worked.

  21. dannyka
    Member
    Posted 9 years ago #

    Applied the fix. Everything looks great!

    --Dan

  22. wghayes
    Member
    Posted 9 years ago #

    Although running Apache 2, I was having redirect problems too. The Toby Simmons fixes cured most of the problems. As soon as I replace my just-deceased monitor, I will try the edit of blog-header.php.

    For details regarding my problems and set-up see my post elsewhere in the forum.

    Any ideas as to why the same problems occurred under Apache?

  23. wghayes
    Member
    Posted 9 years ago #

    I still have a log-in problem. I can log in to the admin page, but each time I go to a different section of admin I am taken to the log-in page and must log in again. Surely this is a bug!

    Also, when I try to switch themes I get a page that is blank except for the error message "Sorry, you need to enable sending referrers, for this feature to work." What is that all about?

  24. martinc
    Member
    Posted 9 years ago #

    I tried the wp-blog-header.php fix. It did not cure all of the problems, especially the aforementioned admin login issue - I get kicked out as admin and forced to reset my password. Again, I had to revert to my 1.2.2 install.

  25. wghayes
    Member
    Posted 9 years ago #

    Doesn't look like 1.5 is not ready for prime time. Looks like half the users are having problems, especially with the log-in and redirect functions. Perhaps it works well on Unix, but most of us are relegated to Windows of one flavor or another.

  26. martinc
    Member
    Posted 9 years ago #

    Word.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.