RSS Fusion 1.0 Released

A few weekends ago I had the need to combine RSS feeds and was not satisfied with any of the solutions I found on the net.  A few hours later, I had a general proof of concept script working – which is now called RSS Fusion.  The site will fuse together multiple rss feeds and attempt to retain as much information as possible.  Currently it only works on RSS, and does not retain enclosures (podcasts) but I will look into adding that ability in the future.

Check it out: http://www.rssfusion.org

Merry Christmas!

WPMU Ldap Plugin 2.6 Released!

In conjunction with the new WPMU release and release numbering, i’m proud to announce the release of the WPMU Ldap 2.6 plugin!  This release does require WPMU 2.6 due to the utilization of some new hooks.

Download it now!

Important Upgrade Notice! – If you are upgrading from the previous 1.3 versions that did not have support for local user creation, its important that after the upgrade you login as the local administrator, and with the "Fix Ldap Meta" option on the plugin configuration page.  This will populate the ldap_login meta value for all accounts (except the local admin) so that existing users are able to login.

Changes:

  • Removed ugly hacks for the retrieve password form utilizing a new filter in the trunk.
  • Freshened up the look of the admin pages

As always, continue to visit the SourceForge project page for details, and to report bugs or add feature requests!

WordPress Post Expirator Plugin Released

The Post Expirator plugin allows the user to set expiration dates for
both posts and pages. There is a configuration option page in the
plugins area that will allow you to separately control whether or not
posts/pages are either deleted or changed to draft status.

The plugin hooks into the wp-cron process and runs every hour.  It was designed and developed to work with WordPress MU, however it will not work in the mu-plugins folder due to how the plugin activation is setup to register the cron hooks.

It can be downloaded from the WordPress Plugin Directory – http://wordpress.org/extend/plugins/post-expirator/

Let me know if anyone encounters any issues and I hope you enjoy it!

WPMU Ldap Plugin 1.5.0 Released!

After a few weeks of testing i’m proud to announce that the official release of the WordPress MU Ldap Plugin for the 1.5 series has been released!  You can download it on the SF project page: Download Now!

The WordPress 2.5 series code changes made quiet a few changes to the authentication and cookie setting bits of the wordpress core.  These changes made alot more sense, and actually allowed me to make the plugin more stable.

Here are a few of the major changes:

  • Remove override of wp_setcookie function – no longer needed!  This also means no more conflict with the admin ssl plugin!
  • Removed experimental wp_munge hooks – no longer needed!
  • Custom pluggable.php is no longer needed, and is totally remove from the release.
  • Revamps logic for local users – removed chunks of unnecessary code!
  • Enhanced error reporting sent back on authentication failures
  • Support for local users!  You can now create local users and use them as well!  Local users can be regular users or admins, it doesn’t matter, they all work!
  • Using the new "Add User" screen, it’s now possible to LDAP users to the blog that have never logged into WPMU.  As long as they exist in your LDAP directory, they can be added!

There are also 2 mailing lists setup:

  • wpmu-ldap-users – All SF tracker changes are posted to this list.  Please continue to post bugs and features to the SF Trackers.  On top of that, it can also be used for general discussion and hopefully more timely resolutions to problems.  Subscribe Here
  • wpmu-ldap-commits – This list is used to notify others of SVN commits.  It is setup as an announce only list.  Subscribe Here

I hope everyone enjoys the long awaited release!

The Quest to Conquer the PHP Session Timeout

PHP sessions are handy little things, however it’s a bit tricky to correctly get a custom timeout to work correctly. There are a few key ini settings:

session.gc_maxlifetime -This setting (in seconds) tells the PHP garbage collector how long to keep the session valid.  The default is 24 minutes.

session.gc_probability – The probability that the garbage collector will run and clean up old session data.  The default value is 1.

session.gc_divisor – The divisor to use with the probability.  The default value is 100.

session.save_path – The path for session values to be saved.  The default is /tmp, however it is important to change this to a custom folder for the application – especially if you are in a shared hosting enviorment.  The garbage collector does not discriminate, and it will delete ANY session data that is older than the set limit, not just ones that correspond to your application.

session.cookie_lifetime – How long to keep the cookie written to the client machine valid.  Defaults to 0, which means the cookie will expire at the end of the broswer session (at logout or when closing the broswer).

Now, before you start anything, make sure you have a writable folder setup for your application that you can use to store your session data.

Start your session with something smiliar to:

ini_set(‘session.gc_maxlifetime’, ‘86400’);
ini_set(‘session.gc_divisor’, ‘1’);
ini_set(‘session.gc_probability’, ‘1’);
ini_set(‘session.cookie_lifetime’, ‘0’);
ini_set(‘session.save_path’, /path/to/sessions/myapp);
session_name(‘myapp’);
session_start();

Setting the above configuration well make sure your session files are saveed in a seperate folder, they will expire in 24 hours, and the garbage collector will run everytime session_start is called to cleanup expired sessions.

The problem with alot of other infomormation is that they will suggest setting the cookie_lifetime to be the same as the gc_maxlifetime.  The problem with this is that when the cookie value is set, the expiration date is not updated as the user continues to be active in the application.  The session data on the server side is updated.  So, if this is the case, after the value of cookie_lifetime has expired, even if the session data on the server was just updated, your session will be invalid, and you will be required to login again.

I hope that this post will help someone else in the quest to conquer the php session timeout.  It definitely is not very clear, and can be very confusing!

Catching penguins one at a time