Web

Live Writer large image problem #3

October 30th, 2007

In March I wrote a couple of posts about a problem using Microsoft Live Writer to post blog entries where I'd included an image above a certain size:

Live Writer large image problem

Live Writer large image problem #2

Basically, if I tried including an image above about 30KB I got the following error:

Error attempting to connect to weblog at:
http://www.itauthor.com/xmlrpc.php

The underlying connection was closed: The connection was closed unexpectedly.

I got the problem again, this evening, trying to upload my previous post, which included several decent-sized images, and I was determined to get to the bottom of the problem. It turns out the problem is with the PHP memory limit. The fix is to adjust the memory limit for PHP for your blog. To do this, simply add the following line to the .htaccess file in the root directory of your blog (in my case this directory is /var/www/html/wordpress on my Web server):

php_value memory_limit 16M

You don't need to restart Apache or anything. Just change the .htaccess file and click Publish in Live Writer and it should work fine now. I can't promise it'll work in all cases, but it worked for me.

Leave a comment

 

Count the number of links on the current page

August 28th, 2007

I was testing a Web page indexer the company I work for produces, and I needed a quick way of finding out how many links were on a page. The way I came up with was to create a Favorite/Bookmark containing the following JavaScript instead of a URL:

javascript:if(frames.length<1){alert('This%20page%20has%20'%20+%20document.links.length%20+%20'%20links.')}else{alert('Sorry.%20This%20page%20has%20frames!%20This%20bookmarklet%20only%20works%20on%20frameless%20pages.')}

The easiest way to create this bookmarklet is just to create a Favorite/Bookmark to the current, call it "Link count" and save it. Then go back in and change the properties of the Favorite/Bookmark, changing the URL to the above JavaScript and, if you want, choosing an alternative icon.

Leave a comment



wp-cache – a reminder to myself

June 20th, 2007

wp-cache is a useful plugin for speeding up your WordPress blog. However, it has some disadvantages:

  1. If you're in the middle of a redesign, where you're changing the presentation features of the site without changing the content, you have to clear the cache to see the effects of changes.

    To clear the cache, go to the wp-content/cache directory and do:
    rm -rf *

  2. If, like me, you have some fairly static pages that contain dynamic content in a sidebar (e.g. an About page that has a list of recent posts in the sidebar), the sidebar content will not change because wp-cache makes sure the page from the cache gets served up unless something actually changes in the content.

    Effectively this means doing a manual cache clear every time you post if you want your static pages to be regenerated.

Turning off wp-cache

WordPress leads you to believe you can turn off wp-cache by deactivating it in the Plugin Management page of the admin interface. Unfortunately it's not as easy as that.

What you need to do is go into your wp-config.php file and delete or comment out (by adding // at the start of the line) the following line:

define('WP_CACHE', true)

If you want to completely remove wp-cache, rather than just temporarily disabling it while you do some redesign work:

  1. Delete the wp-cache directory within the wp-content/plugins directory.
  2. Delete the line from the wp-config.php file, as above.
  3. Delete the wp-cache-config.php and advanced-cache.php files from the wp-content directory.

Where wp-cache comes into its own is if you have a standard blog that gets a lot of hits. wp-cache stores ready-made HTML pages that can be served straight up to your visitors without having to use PHP to generate SQL queries to the MySQL database and build HTML dynamically.

Potentially similar posts

Leave a comment



Stopping IE7 displaying the about:tabs page

June 20th, 2007

Another one for IE7 users. Similar to the last one but this time "about:tabs" rather than "about:blank".

If on opening a new tab you see the "about:tabs" page and checking the Don't show this page again check box has no effect, you can modify your Registry to fix the problem (looks like something Microsoft forgot to put in there).

Note: Don't attempt the following unless you're familiar with editing the Windows Registry and are aware of the inherent dangers in doing so. Always export a copy of the Registry (or the bit of it you're changing) before making any changes.

  1. Go to:
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing]
  2. Add a new DWORD called
    ShowTabsWelcome
    with a value of 0
  3. Restart IE7.

Leave a comment



Stopping IE7 displaying the about:blank page

June 20th, 2007

When I open a new tab in IE7 I expect it to show something. By default, however, it loads a blank page (about:blank).

To me, opening a blank page just feels like a bug somehow, even if it does get the tab opened quicker and the chances are the first thing you're going to do is put a URL in the address bar or do a search from your Google toolbar.

So if, like me,  you don't like getting the about:blank page, here's what to do:

  1. Choose Tools > Internet Options.
  2. In the Tabs section of the General tab, choose Settings.
  3. Select the Open home page for new tabs instead of a blank page check box.
  4. Click OK.
  5. Click OK again on the Internet Options dialog box.
  6. Try opening a new tab. You should see you first-choice home page.

Potentially similar posts

Leave a comment



^ back to top ^

Page 7 of 15« FirstNewer56789OlderLast »