Posts

WordPress Media crop button greyed out

In WordPress Media it is possible to edit the images in some basic ways including cropping. To use the tool you must fist make a selection in the image by clicking and dragging across the image. The selection must be wider than the smallest image setting in WordPress. Otherwise the crop tool will stay greyed out. Once a large enough selection has been made the crop button becomes clickable. This is not always logical to the user who often try to click the crop button first.

Cropping images in WordPress

/tmp problem when installing plugins in WordPress

When you try to install a plugin in WordPress and get an error message like this:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp//google-integration-toolkit.tmp) is not within the allowed path(s): (/var/www/XXX/) in/var/www/XXX/web/wp-includes/functions.php on line 2140

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 12345 is not allowed to access /tmp owned by uid 0 in /var/www/XXX/web/wp-admin/includes/file.php on line 184

Download failed. Could not create Temporary file.

This is happening when the server is running with SAFE MODE because WordPress will not be able to access paths outside it’s web root. Find out the full path to your web root on the server (a hint is in the error message you just saw). Create a temporary directory within your website path and add the following line.

Edit wp-config.php and add:

define(‘WP_TEMP_DIR’, ‘/var/www/XXX/tmp’);

(Replace /var/www/XXX/tmp with the full path to your temporary directory.)

WordPress insert image/video/music problem caused by plugin

When writing a post in WordPress, and you press Upload/Insert buttons to insert images, video, music or other media you can run into a problem where a popup displaying “Are you sure you want to do this?” is showing instead of the normal insert screen. The problem is described here. As mentioned in the posts, it is caused by some plugin. This can be hard to guess as the plugin in question might have nothing to do with writing and posting articles.

I ran into this problem using the latest WordPress 3.0.1. The plugin that was causing trouble for me was WP-ContactForm. By disabling it, it was possible to insert images in the posts again.

If you experience this problem, try disabling all plugins. If inserting images now works, try enabling the plugins one by one to figure out which one is causing the trouble.

WordPress blog: Problem with uploaded images

In WordPress blog software version 2.7.1 there is a problem after a default install when uploading images. The images are stored in the ‘wp-content’ folder but referred to with ‘wp-content/uploads’ path. The result is that uploaded images can’t be used in blog articles.

To resolve this problem, click on Settings, then Miscellenous. Note that the media path is ‘wp-content’ but the note at the right says that default is ‘wp-content/uploads’. Just click the ‘Save Changes’ button and the problem will be resolved.

There seems to be some default reference to ‘wp-content/uploads’ in the distribution of WordPress, but the settings are set to just ‘wp-content’.

WordPress image problem