WordPress.org

Ready to get started?Download WordPress

Forums

WordPress files download when I click links (20 posts)

  1. ventrilqstman
    Inactive
    Posted 7 years ago #

    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???

  2. hughbiquitous
    Member
    Posted 7 years ago #

    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.

  3. hughbiquitous
    Member
    Posted 7 years ago #

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

    http://comox.textdrive.com/pipermail/wp-docs/2006-December/001398.html

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

    "You have chosen to open FAQ, which is a: application/octet-stream from:
    http://codex.wordpress.org. Would you like to save this file?"

  4. Doodlebee
    Member
    Posted 7 years ago #

    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.

  5. Chris_K
    Member
    Posted 7 years ago #

    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.

  6. Doodlebee
    Member
    Posted 7 years ago #

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

  7. hughbiquitous
    Member
    Posted 7 years ago #

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

    Long answer...

    Here's the platform: Firefox 2.0.0.3, 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...

  8. ventrilqstman
    Inactive
    Posted 7 years ago #

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

    Any idea why that would cause it.

  9. ventrilqstman
    Inactive
    Posted 7 years ago #

    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.

  10. simsen
    Member
    Posted 7 years ago #

    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.

  11. hughbiquitous
    Member
    Posted 7 years ago #

    simsen,

    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.

  12. simsen
    Member
    Posted 7 years ago #

    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.

  13. simsen
    Member
    Posted 7 years ago #

    FIXED IT!

    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

  14. hughbiquitous
    Member
    Posted 7 years ago #

    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.

  15. simsen
    Member
    Posted 7 years ago #

    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.

  16. simsen
    Member
    Posted 7 years ago #

    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?

  17. jck4
    Member
    Posted 7 years ago #

    I had this problem after moving some directories around on the Apache server, changing URLs, and reconfiguring WordPress by editing the database directly... not reinstalling.

    Anyway, I fixed it by deleting all my cookies in Firefox. I suppose I could have gone in and only deleted the WordPress cookies, but whatever. Hope this helps.

    Kyle Health

  18. marlowe5
    Member
    Posted 7 years ago #

    I was having this problem with all instances of "post.php" (i.e. creating a new post or editing old ones). Our web host finally figured out that our apache server wasn't parsing php files correctly and they did some magic on their end that solved the problem.

    I would talk to your web host if you are having similar problems.

  19. jgoddard
    Member
    Posted 6 years ago #

    You'll have to update the memory_limit in your php.ini file. I've explained it on my site here.

    http://www.jarrodgoddard.com/web-development/wordpress-prompting-to-download-files-instead-of-displaying-them

    Your memory_limit is too small, I updated mine to 25M and it worked fine. To determine this was the problem, I checked my error logs and saw that the memory was exhausted and I had to update the memory_limit in my php.ini.

  20. Tdude
    Member
    Posted 6 years ago #

    Hmmm. Someone ever considered subdirectories and file rights or redirects (mis)configured on the server?
    I have this on all wp files, but not on a simple phpinfo() run on a new server I'm working. The phpinfo() command should show someone who knows Apache info about what's wrong, but unfortunately not me ;)

Topic Closed

This topic has been closed to new replies.

About this Topic