With WordPress 2.7 I still have problems to do a core update, installing plugins with the automatic update procedure or even update existing plugins. I’m getting an error like this:


WordPress update

Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /is/htdocs/your_path_to_wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 200.

Unable to locate WordPress directory.”

On many Blogs you can find a so called solution


“Edit the file.php and search for “if ( getmyuid() == fileowner($temp_file) )” and replace “if ( getmyuid() == fileowner($temp_file) )” with “if ( posix_getuid() == fileowner($temp_file) )”, save and upload and it works…”

Be careful!

This is not a fix this is a quick and dirty break. Leave the file.php untouched and try a real solution. Why is it quick and dirty? First of all after a core update your hack is gone and you have to investigate your time again. On the other hand it only works if your WP is on a linux web server and you might loose the permissions to files and folder updated with the quick and dirty solution.

Please follow up with a solution that really helps you out and work:

Before getting to the solution first have a look at your wp-config-php:
You can add this line to give a specific folder for uploading and working:

define(’WP_TEMP_DIR’, ‘/is/htdocs/your_path_to_wp/temp/’);

verify that the folder exists and has appropiate rights, this depends on your provider. You also can add these lines to set up with which rights WP will generate the new files and folders:

define(’FS_CHMOD_FILE’,644);
define(’FS_CHMOD_DIR’,755);

These two or three settings is not to solve the problem, just to show that there are more options that you can use to make WP run and gives you more control.

Now here is the real solution to our problem:

You need to create two new folder at your plugin folder at your web server and add the following code into a php-file like this:

Plugin 1:
Save this code into a file called force-ftp-ext.php and upload it into a folder beneath your plugin folder for example: plugins/useextftp

<?php
/*
Plugin Name: Force FTP Extension for WP Filesystem
Version: 1.0
Plugin URI: http://dd32.id.au/wordpress-plugins/?force-ftp
Description: Forces the WP_Filesystem to utilise the FTP Extension library.
Author: Dion Hulse
Author URI: http://dd32.id.au/
*/

add_filter(‘filesystem_method’, ‘force_ftp’);
function force_ftp($method) {
return ‘ftpext’;
}
?>

as this plugin will not work on all web servers depending on their configurations try the second plugin (for me the 2nd method is the one that works for me!):

Plugin 2:
Save this code into a file called force-ftp-sockets.php and upload it into a folder beneath your plugin folder for example: plugins/usesocketftp

<?php
/*
Plugin Name: Force FTP Sockets for WP Filesystem
Version: 1.0
Plugin URI: http://dd32.id.au/wordpress-plugins/?force-ftp-sockets
Description: Forces the WP_Filesystem to utilise the FTP Sockets library.
Author: Dion Hulse
Author URI: http://dd32.id.au/
*/

add_filter(‘filesystem_method’, ‘force_ftp_sockets’);
function force_ftp_sockets($method) {
return ‘ftpsockets’;
}
?>

Depending on the web server or provider settings you have to activate simply ONE of the plugins – do not activate both at the same time! The last plugin needs the FTP Sockets Library to be installed.
You have to try if plugin 1 or plugin 2 works for you, you can wait until someone updates a plugin or simply try to install a new plugin with the built in plugin installer of WP 2.7.

Both plugins are experimental and not an official release but I found they should be published. They come with no warranty and you will use them on your own risk.
The author of the plugins is DD32 and the website can be found here: http://dd32.id.au

Have fun and good look with this solution…

Article by Ben Dash!

A question came in the beginning of using the xLanguage plugin: how can you make the default widgets’ (that came with wordpress) title bilingual, as the method with the ‘|’ Single Line Syntax doesn’t work for them. I’ve read in several places that other people also have this problem, so I thought I might give you the solution, with my general experiences regarding this issue.

On the xLanguage website the author mentions that you can eliminate this ‘error’ with a little hack. However, the description he gives is not very spoonfed, so I ran into problems interpreting the first step:

1. Open the php file that contains the widget code

Well, all right, but where is this php file? After searching a little with Google, I found out that I need to edit the widgets.php; of course you can’t edit it in the theme editor, so I’ve searched there in the php codes for a $before_title variable – basically for nothing. Then I went to FTP, and I found two widgets.php files, in the wp-admin and in the wp-admin/wp-includes directory. I edited these files topsy turvy for about 45 minutes, ’til I realized that it would be utterly stupid to have the visitor load the widgets from the wp-admin directory. So I went on searching for more widgets.php-s, and I finally found the right file, which is under wp-includes (not inside the wp-admin directory).

After this, the step-by-step instructions were pretty easy, this is how I did the magic:

1. You open the widgets.php file in the wp-includes directory, with notepad for example.

2. Use the Edit->Replace function, and replace all codes in the php that looks like this:

echo $before_title . $title . $after_title

With that:

echo $before_title . apply_filters(‘localization’, $title) . $after_title

And that’s it, after that the Single Line Syntax works just fine, and the default widgets appear bilingual as you wanted them in the first place. If you want to make other installed-by-plugin widgets bilingual, now that can be tricky, because usually the format of those codes differ from the aformentioned, but generally you should search for a $title variable or something similar, and wrap the filter around it.

Adopted from: http://hellosam.net/lang/en/project/xlanguage/

© 2010 Yogie's Foto Seite | Yogie's Photo Page Website hosted by Host Europe Suffusion WordPress theme by Sayontan Sinha
Content Protected Using Blog Protector By: PcDrome.