Support » Fixing WordPress » WordPress files download when I click links

  • I seem to have a really weird problem in my dashboard. When I click on a link to go to a place in the dashboard it will just keep loading untill finally, instead if going where I want, it will bring up a download dialog for a file.

    For example…
    If I click to logout it may sit for while, and then bring up a download dialog for wp-login.php

    If I try to apply a new theme it will sit and load for awhile, and then bring up a download dialog for themes.php

    I know this blog works, because I had it working. I have also had other wordpress blogs do this soon after install, and eventually it seemed to go away.

    What could be going wrong here, and why on earth is it making me download these files, and the sometimes not even executing the link I clicked on???

Viewing 15 replies - 1 through 15 (of 19 total)
  • I’ve seen this as well. I haven’t taken the time to investigate it but I’ll just add the info I know about for now…

    * The way I see this manifested most often is when I’m editing in the post-new.php screen, when I click “Save and Continue Editing.”

    * I’ve only seen it happen in Firefox. I’ve never seen it happen in IE (but then, I only use IE when I have to).

    * I’ve seen it happen for admin-side functions as well as the public side of the blog.

    * I’ve seen it happen for two different WP installations I support. Both are hosted by DreamHost on Apache 2.0 servers.

    * I can’t make it happen consistently. I hope to get a WireShark capture of an incident and see if it’s something the server is sending down differently, or if it’s something in my browser.

    FWIW, This looks like the same kind of thing I see:

    In particular, this is exactly the sort of thing I see:

    “You have chosen to open FAQ, which is a: application/octet-stream from: Would you like to save this file?”

    The *only* time I’ve *ever* seen wordpress files get prompted for download (instead of displaying) is because PHP is misconfigured on your host’s server. It’s not recognized as a program that can be read and displayed via a browser. Kind of like when you donwload a file that has an extension that’s not recognized, it’ll ask you what you’d like to open the file with. Same concept. If it’s asking you to download the files instead of displaying it, PHP isn’t configured right on your server, and you need to contact your host. You say it was working before? Then they’ve done something, and you need to contact them to see what’s going on.

    And for the record, that file you’re referring to (the FAQ) opens just fine in my Firefox.

    I’ve seen it happen on timeouts (for instance, when posting and there are too many pingers defined — or they time out) or when php maxmem is exhausted.

    Well, there you go. I knew someone else might have another idea 😉

    Figured it out. Short answer: it’s Google Toolbar.

    Long answer…

    Here’s the platform: Firefox, Google Toolbar 2.1.20060807W, XP SP 2.

    Here’s what happens:

    1. I browse to the blog.

    2. Google Toolbar sends an “X-Moz: prefetch” request for my RSS feed. (Observed with WireShark)

    3. If I click on a link within a certain amount of time (and I don’t know how long that needs to be), instead of navigating to the page, I get prompted to download it.

    4. I took out the RSS feed from my header.php file. The symptom could not be reproduced.

    5. I restored the RSS feed in my header.php file. The symptom was reproducible.

    6. I disabled Google Toolbar. The symptom could not be reproduced.

    7. I enabled Google Toolbar. The symptom was reproducible.

    It’s worth noting that in my Firefox about:config, I have network:prefetch-next turned off, but Google Toolbar still prefetches things.

    This still doesn’t explain why prefetching should mess anything up…

    I found out that this always happens after I ude blogger rss import…

    Any idea why that would cause it.

    A temporary solution

    OK here’s what I did to get me by. There is defiantly a problem here that many people deal with, and I can’t figure out why WP does not have a fix, or support document in it (unless I just missed it)

    In any case I found that the problem (for me) started after I used blogger rss import. It would bring in my posts, but as soon as that was done everything started weirding out to a point on non functional. When I clicked to do something (like write a post) is would usually just load, and load, and load, and then prompt me to download a php file that was blank. Even after I deleted the blogger import plugin when it finished I still had the problem.

    Some posts indicated that it was a memory issue, so I tried to adjust that but it seems yahoo has no way to let you change your php memory, and no htacces file so that did not work.

    What I did was use a backup from before I used blogger rss import. All I need was the posts, by I deleted all the databases that I had backed up, except posts. I then restored it with my backup from before the import, thus keeping my posts, and getting the operation of the blog back to normal operation.

    Just wanted to post a temporary solution until someone can find out exactly what id causing all this.

    I have the same problem, and it is really bugging me now.

    I too have Firefox and Google Toolbar, and the problem goes away if I remove Google Toolbar AND / OR if I remove this line

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

    from header.php.

    I am VERY much looking forward to a solution to this.

    ventrilqstman’s A temporary solution does not apply to me.


    You may already know this, but that line that you’re considering removing is what allows discovery of your RSS feed.

    IMO, to remove that line would be to cripple your site.

    Yes, hughbiquitous, thank you for reminding me. Needless to say, this worries me quite a lot, and I do not have the technical proficiency to systematically problem-solve this.

    Hence my appeal to the wider community, I am sure there are some bright people out there who could point me (us) out in the right direction.


    I edited the file wp-includes/functions.php, line 336 in the function gzip_compression(). I merely commented out the line ob_start('ob_gzhandler');. I think I disabled gzip compression, but right now I don’t care, I do not get a file-download prompt anymore.

    I hope someone will fix the code properly some day.

    – S

    Interesting. Did you try turning off gzip compression through the admin options panel? When I tried that it didn’t help me.

    Next chance I get I’ll try your fix just to see what kind of difference it makes.

    I never had that option turned on, so it seems that the function gets called regardless.

    By the way: Better to insert return false; above the ob_start…-line rather than commenting it out.

    Darnit, I was too quick. Problems are back. But I have narrowed it down: symptoms only appear when the plugin Ultimate Tag Warrior is enabled.

    So: either remove the alt link to my feed in header.php OR disable Ultimate Tag Warrior. What do do? Any suggestions?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘WordPress files download when I click links’ is closed to new replies.