Jaslabs: High performance Software

High Performance Software

Archive for January, 2007

A feedburner fix for wordpress 2.0.6

By Justin Silverton

In a recent article here a recent issue has been discovered with the latest version of wordpress and feedburner:

After upgrading to WordPress 2.0.6 or WordPress 2.1 Beta, your FeedBurner feed will, at times, give you an “invalid xml” error, and “FeedMedic” will show you something like this:

Your server disconnected us before sending the full source feed content.

The Fix

There is a simple way to fix this issue, which involves the following steps:

1) Open /wp-includes/functions.php and find the following code (around line 2231):

if ( substr(php_sapi_name(), 0, 3) == 'cgi')
                @header("HTTP/1.1 $header $text");
        else
                @header("Status: $header $text");
}

2) change to the following:

//      if ( substr(php_sapi_name(), 0, 3) == 'cgi')
                @header("HTTP/1.1 $header $text");
//      else
//            @header("Status: $header $text");
}

3) Save the file and exit. Resync your feed at FeedBurner

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati
1 comment

Wordpress 2.0.6 released

By Justin Silverton

wordpress 

Wordpress 2.0.6 has been released! 

From the official wordpress site:

“We have a pretty important release available for everyone, it includes an important security fix and it’s recommended that everyone upgrade. This is the latest release in our stable 2.0 line, which we’ve committed to maintaining for several more years.

Here’s what’s new:

  • The aforementioned security fixes.
  • HTML quicktags now work in Safari browsers.
  • Comments are filtered to prevent them from messing up your blog layout.
  • Compatibility with PHP/FastCGI setups.

For developers, there’s a new anti-XSS function called attribute_escape(), and a new filter called “query” which allows you filter any SQL at runtime. (Which is pretty powerful.) Thanks to Mark Jaquith for handling this release and Stefan Esser for responsibly reporting the security issue.”

It can be downloaded here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati
1 comment

Should mysql be using GPLV3?

By Justin Silverton

In a recent announcement:

“MySQL has today refined its licensing scheme from “GPLv2 or later” to “GPLv2 only“, in order to make it an option, not an obligation for the company to move to GPLv3.

Specifically, this means that copyright notice in the MySQL source code files will change from referring to “either version 2 of the License, or (at your option) any later version” to “version 2” only, in the MySQL 5.0 and MySQL 5.1 code bases”

Mysql is one of the best examples of a successful open source project and it is used by many businesses and people around the Internet.

If the FSF wants free software to be widely supported and used by the masses (which seems to be one of their main goals), they need to start looking more at the needs of businesses (which may actually get us better driver support for linux).

Although the FSF is still in the drafting process of the GPLV3,   there are still some big changes that will most likely make it to the final version:

  • GPL software can is not compatible with digital rights managements (DRM)
  • Patents cannot be used to make free software non-free
  • If your work communicates with an online service, it must be possible for modified versions to communicate with the same online service in the same way such that the service cannot distinguish

more information can be found here

A more restrictive license is not the answer.  This will make businesses think twice before deciding to use or contribute to free software. 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati
No comments

Debugging PHP scripts

By Justin Silverton

Debugging PHP scripts can be a difficult task, so I have written this simple php debugger class.  It will display all GET and POST variables and all the properties on a currently defined object.

The code

(copy this in debug.php)

function DebugClass($class)
{
 $class_vars = get_object_vars($class);
 echo "<b><u>Class contents</b></u><br><br>";
 foreach ($class_vars as $key => $value)
  echo "<b>Property Name: </b>".$key." <b>Property Value: </b>".$value."<br>";  
}
//this displays all get and post variables
function DebugIncoming()
{
  echo "<b><u>GET and POST contents</b></u><br><br>";
  echo "<b><font color=\"red\">GET contents</b></font><br><br>";
  foreach ($_GET as $key=> $value)
  echo "<b>Variable Name: </b>".$key." <b>Variable Value: </b>".$value."<br>";
  
  echo "<br><br>";
 
  echo "<b><font color=\"red\">POST contents</b></font><br><br>";
  foreach ($_POST as $key=> $value)
  echo "<b>Variable Name: </b>".$key." <b>Variable Value: </b>".$value."<br>";
   echo "<br><br>";
}
//display all current POST and GET values
DebugIncoming();

Usage

Include the above file from a script you would like to debug.  Also, to print out all of the currently defined properties of a class instance, use the following function:

DebugClass($objectInstance);

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati
2 comments

Jrotate version 3 released!

By Justin Silverton

jrotate pro

Jrotate version 3 has been released!

Jrotate is A web photo gallery for displaying all of your favorite pictures.

  • Easy Site integration
  • Thumbnail support
  • Multiple galleries
  • 1 year free updates

This new version includes many bug fixes and updates.

A demo can be downloaded Here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati
No comments

« Previous Page