WordPress: Redirecting Old Tag URL to New Tag Location

Posted on in Categories Howto, lighttpd, Linux, php last updated October 8, 2008

Recently, I had noticed lots of 404 error generated by my wordpress software. My old wordpress tag structure changed from:
/tips/tag/linux_software
/tips/tag/one_two_foo

To:
/tips/tag/linux-software
/tips/tag/one-two-foo

As a result lots of error 404 was dumped into my log file. I wrote a small php code to get rid of the problem.

Troubleshooting Lighttpd Chrooted RedHat PHP Version 5.1.6-20.el5_2.1

Posted on in Categories CentOS, GNU/Open source, kernel, lighttpd, Linux, Linux distribution, php, RedHat/Fedora Linux, Troubleshooting last updated October 1, 2008

It appears that latest php version 5.1.6-20.el5_2.1 under RHEL / CentOS Linux v5.2 has made some major changes. As a result choort jail setup using previous instructions no longer works. PHP is crashing with segmentation fault errors. So I had to trace php errors using strace command.

mod_compress: Lighttpd Gzip Compression To Improve Download and Browsing Speed

Posted on in Categories Apache, High performance computing, Howto, lighttpd, Linux, News, php, UNIX last updated December 14, 2008

Gzip compression reduces response times by reducing the size of the HTTP response. This document describes gzipping http traffic which can reduces the response size by about 70%. Approximately 90% of today’s Internet traffic travels through browsers that claim to support compression.

PHP Programming Tutorial: Merge and Filter RSS / Atom Feed With XQuery

Posted on in Categories Howto, Linux, php, Security, UNIX last updated February 7, 2008

I’ve already written about merging two feeds using MagpieRSS and FeedCreator php classes. However, I wasn’t aware of XQuery query language that is designed to query collections of XML data. It seems similar to SQL. You can use XQuery to speed your merging and filtering of RSS / atom information (feed) easily. In this tutorial:

You will learn the basics of XQuery processing of RSS and Atom feeds to turn a single feed into an HTML document. Then you produced a more complete solution for outputting the information in a format that suits your needs, including sorting, merging multiple feeds and even handling different feed and source information types. XQuery makes it much easier to merge and filter information from XML documents when you embed the filtering instructions right into the document that you use to generate the output format. You can use that functionality to aggregate information from RSS and Atom feeds into the format you need. In this article, look at the structure of the RSS and Atom formats and how XQuery can simplify the display of that information.

=> Aggregate RSS and Atom information using XQuery

Coverity Scan: Security Holes Found in Open Source Projects

Posted on in Categories Links, News, Open source coding, php, programming, Security last updated January 9, 2008
Coverity Logo

Coverity is a company that creates tools for software development. Its premiere product is Prevent, a static-analysis code inspection tool. Coverity offers the results of Prevent’s analysis for free to open source developers.

From the project home page:

In collaboration with Stanford University, Coverity is establishing a new baseline for software quality and security in open source. Under a contract with the Department of Homeland Security, we apply the latest innovations in automated defect detection to uncover some of the most critical types of bugs found in software.

So the most notable use of Prevent is under a U.S. Department of Homeland Security contract, in which it is used to examine over 150 open source applications for bugs. Popular open source projects, such as Samba, the PHP, Perl, and Tcl dynamic languages used to bind together elements of Web sites, and Amanda, the popular open source backup and recovery software running on half a million servers, were all found to have dozens or hundreds of security exposures and quality defects.

For example, over 75% of the defects Scan identified in Samba were fixed within two reviews of the Scan analysis.
Over 75% of the defects Scan identified in Samba were fixed within two reviews of the Scan analysis.
(Fig. 01: Samba Project Code Scan Result)

=> More information about project and bugs (including charts) available at offical web site.

A total of 7,826 open source project defects have been fixed through the Homeland Security review, or one every two hours since it was launched in 2006, according to David Maxwell, open source strategist for Coverity, maker of the source code checking system, the Prevent Software Quality System, that’s being used in the review.

This project is really helping out to improve overall open source software quality.