In WordPress 2.7 there is a nice feature to automatically update plugins or the core via one simple click on a link. For quite a while I couldn’t get it to work as it was producing errors like:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/tmp//1220989448) is not within the allowed path(s): (/home/usr123/:/tmp:/usr/local/lib/php/) in /usr/home/usr123/../wp-includes/functions.php on line 1960
Warning: touch() [function.touch]: open_basedir restriction in effect. File(/var/tmp/1220989448) is not within the allowed path(s): (/home/usr123/:/tmp:/usr/local/lib/php/) in /usr/home/usr123/../wp-admin/includes/file.php on line 122
Warning: fileowner() [function.fileowner]: open_basedir restriction in effect. File(/var/tmp/1220989448) is not within the allowed path(s): (/home/usr123/:/tmp:/usr/local/lib/php/) in /usr/home/usr123/../wp-admin/includes/file.php on line 487
Warning: unlink() [function.unlink]: open_basedir restriction in effect. File(/var/tmp/1220989448) is not within the allowed path(s): (/home/usr123/:/tmp:/usr/local/lib/php/) in /usr/home/usr123/../wp-admin/includes/file.php on line 489
This morning I finally found THE hint that has lead me to the solution to fix it and to be honest it was amazingly simple!!
WordPress is trying to use the wrong path, duhh, but the correct path is also provided in the error message. In my case I have to point WordPress to the /tmp path instead of the found /var/tmp path!!
When you follow the error messages you finally end up in the get_temp_dir function (/wp-admin/includes/file.php:97) which basically provides the answer straight away after you run a full source code search on WP_TEMP_DIR…
function get_temp_dir() {
if ( defined('WP_TEMP_DIR') )
return trailingslashit(WP_TEMP_DIR);
So the solution is to define WP_TEMP_DIR in the wp-config.php file:
Today I came across a new events plugin called Agenda. Looks very promising even without a prepacked widget. So after playing around with it for a short while I started to write a plugin for it (source here) and hopefully it will be adopted by the plugin author, DGMike.
While writing the widget I also noticed some bugs and the need for some extra features.
Features:
Ship a widget with it – you can use my Agenda Widget for this, see source.
Show today’s and all day event’s until their end time.
Remove time notification when it’s a all day event.
Change $title_tag into to the $before and $after model for more template flexibility.
Localization by translation domain. Change:
__('text')
into:
__('text', 'agenda')
Have also used that in the plugin I have created.
Ship a .pot with it for translators. I will translate into Dutch when available.
Bugs:
When repeating on a daily basis the start time changes (looks like the function add (for example) 24 hours to the end time instead of the start time). )
Visual editor isn’t working.
Time droplists are out of sync with the input boxes (further to the right).
When using agenda_compromissos() the <a href> isn’t populated.
Add ‘no events’ message when there are no events to show, I’m now getting an error message.
Styling doesn’t fit in the (smaller) crazyhorse design of 2.7 and perhaps it’s an idea to keep in line with the default WP colors for the background.
Remarks:
The ‘Event’ page should not be registered as a menu item when you use 2.7 as the structure of the menu’s has changed. The Add New link on the Events page will follow the style WP is using on the Posts and Pages pages.
Questions:
How can you get the location and date(s)/time(s) visible in the post?
I will put some effort in this plugin as well as I really like it so I will start cracking the extra features and bugs as well and will make suggestions to DGMike.
Great news. Today on the WordPress front as version 2.6 “Tyner” has been released as a stable version. The latest WordPress version comes with a long list of improvements. The following list comes from the official WordPress announcement:
Word count! Never guess how many words are in your post anymore.
Of all the improvements I really enjoy the new image system and the revision control as that where definitely points which needed improvement in previous versions of WordPress. If you want to see the new features in action, the WordPress guys have made a short video in which they explain the new features: