Written on December 8, 2009 at 2:02 am, by Lupo
Today, after upgrading packages with apt-get on a server running Debian Lenny my PEAR installation seemed to be broken. PHP had been updated to 5.2.10 and PEAR version was now 1.8.0. So when I realised that PEAR wasn’t the latest stable I tried upgrading PEAR using the command I’ve always used: pear upgrade pear, where the first “pear” is the command we run, then the “upgrade” sub-command and finally the name of the package we want to work with, unsurprisingly “pear”.
So I type the following expecting a happy success message and get this instead:
# pear upgrade pear
Notice: Undefined variable: dorest in PEAR/Command/Install.php on line 1220
Notice: Undefined variable: latest in PEAR/Command/Install.php on line 1228
Notice: Undefined variable: latest in PEAR/Command/Install.php on line 1234
Warning: array_change_key_case(): The argument should be an array in PEAR/Command/Install.php on line 1234
Nothing to upgrade
After a quick look at the problem I figured out that it was a problem with the cached channel data that PEAR stores under a directory called ./channels in the PEAR installation directory. The problem is quickly solved by deleting the files in that directory. To find out where PEAR is installed you can use the “pear list-files” command as follows:
# pear list-files pear
Installed Files For pear
========================
Type Install Path
php /usr/local/zend/share/pear/OS/Guess.php
php /usr/local/zend/share/pear/PEAR/ChannelFile/Parser.php
...
Read more
Written on October 3, 2009 at 1:50 pm, by Lupo
As a PHP enthusiast I was very pleased a couple of weeks ago when I read that PHP is already in the top 3 in programming language popularity only after Java and C. This popularity index is based on the number of professional programmers, training courses and vendors.

Source: TIOBE Software – http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Written on September 13, 2009 at 9:58 pm, by Lupo
This quick tutorial will show you how to set up a FreeBSD machine (based on minimal install) to run as a web server using Apache 2.2.x, PHP 5 and MySQL 5. This tutorial is based on FreeBSD 7.2 (the current stable release at the time of this writing).
This tutorial builds on the minimal installation described here and assumes you have also downloaded the ports collection. If you haven’t done so please read the following article first: Managing ports in FreeBSD.
Written on June 1, 2009 at 8:08 pm, by Lupo
Web application security is something that requires the collaboration between coders, designers, system admins, hosting providers, webmasters and businesses/organisations decision makers.
If security is not carefully planned at every level we could end up with a very secure operating system and network but a vulnerable app, or we could be running a super secure web app on a system with a vulnerable FTP server that we are not aware of and compromise the whole system. In the same way we could build a secure system and then start adding new features and components without following documented design guidelines and create new vulnerabilities as the project evolves.
A web application will always be “vulnerable”, because of its own nature. The question is: how do we manage this risk? Three complementary strategies should be implemented in parallel to ensure that we not only mitigate risk, but also prevent foreseeable problems and provide a clear disaster recovery strategy to minimise down-time. Read more