I’ve never thought about deleting a Memcache key is a difficult task. It took me few hours to figure out a working solution. No kidding. FYI, I am using PHP 5.4 Suppose you store a very expensive data into the Memcache, and you decide to delete it later. According to the PHP documentation, it should be very simple: $memcache_obj->delete('key_to_delete'); or memcache_delete($memcache_obj, 'key_to_delete'); However, this...
Read More[PHP]How to delete Memcache variables in PHP?
[FreeBSD]The devel/pkg-config port moved to devel/pkgconf; Reason: pkg-config has been replace by pkgconf; pkgconf-0.8.5 conflicts with installed package(s): pkg-config-0.25_1
FreeBSD is designed for users who got lots of spare time. Every once a while, it will give you some troubles (or “snacks” in programmer language), which help you to burn some of your spare time. If you cannot handle those troubles, then FreeBSD is not for you. Although FreeBSD is a rock solid operating system, it is not smart enough to tell whether the owners (i.e., me and you) got plenty of spare time or not. Anyway,...
Read More[FreeBSD]How to run PECL Tokyo Tyrant in PHP 5.4
After upgrading to PHP 5.4.3 (which is the first version of PHP 5.4 available in the FreeBSD port), I found that the pecl-tokyo_tyrant could not be compiled. Here is the error messages: cd /usr/ports/databases/pecl-tokyo_tyrant sudo make ===> pecl-tokyo_tyrant-0.6.0 cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5). *** Error code 1 Stop in...
Read More[PHP/FreeBSD]===>>> The databases/php5-sqlite port has been deleted: Removed from core php ===>>> Aborting update
When PHP 5.4 was available few months ago, I was hesitated to upgrade my FreeBSD box to upgrade to 5.4, because it comes with lots of big changes, including removing LOTS of old stuffs that were available in 5.3 or earlier versions. Today PHP 5.4.3 becomes available in FreeBSD ports. I guess it is stable enough and I should give it a try, and I am glad that I tried it in my test machine first. Warning: Before you upgrade to PHP 5.4,...
Read More[PHP]Fatal error: Allowed memory size of x bytes exhausted (tried to allocate y bytes)
A user complained to me that my PHP web applications stopped working today. After I digged into the error log, I found that following message: PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0 Obviously, this is related to the memory error. Therefore I tried to increase the limit of memory_limit in php.ini. Since I have 8G of memory in my box, I think it is okay to...
Read More[Solved]Problem to Update OpenLDAP in FreeBSD
Recently, I found the following error message when updating my FreeBSD system regarding to the OpenLDAP: ===> Installing for openldap-client-2.4.31 ===> Generating temporary packing list ===> Checking if net/openldap24-client already installed ===> Creating users and/or groups. Using existing group `ldap'. Creating user `ldap' with uid `389'. pw: user 'ldap' already exists *** Error code 74 Stop in...
Read MoreHow to improve ZFS performance
Recently, I built a FreeBSD server with ZFS file system using six 2TB harddisks. If you like to learn what I have done or understand more about ZFS, you can read the story here: ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.. Many people found a problem on their ZFS system. The speed is slow! It is slow to read or write files to the system. In this article, I am going to show you some tips on improving the...
Read More[FreeBSD] Samba does not start after updating to 3.5.14
After I updated my Samba to 3.5.14 on my FreeBSD box today, it stopped working. I couldn’t connect to the Samba server from my Windows clients. Initially, I thought it was the memory cache issues, and I thought the problem would be solved by rebooting both machines. Unfortunately, it didn’t work. Therefore, I accessed to the server and check the cause of the problem. First, I found that Samba was not evening running. ps -ax...
Read MoreHow to Install a 2.5TB, 3TB drives on Linux
Recently I got a new hard drive (3TB) for my Linux box at work. I didn’t realize that it is problematic / nightmare to do such a simple work. First, if you try to use fdisk to add the drive, it won’t work. Or I should say… it works, but it only give you a 2TB usable space. This is a limitation of fdisk, because it can handle up to 2^32 -1 sectors (or 2TB). That’s why fdisk is not a solution here. It seems that the...
Read MoreAdd-ons for New Version of Firefox 21
Every time Firefox releases a major upgrade, we love it because it comes with lots of cool features. At the mean time, we hate it because lots of our favorite add-ons are not working with the new Firefox. Sometimes, the owners of the add-ons might be too busy, and it might take a while to release a compatible version. That’s why I put some of my favorite add-ons here. They are 100% compatible with the new Firefox, and I only modified...
Read More