Friday, February 16, 2018

Swiftmailer cannot work after upgrade php to 5.5

I'm using SwiftMailer to send email by SMTP. The library is working fine when running in the server with PHP version 5.4. However, after upgrading the server to PHP version 5.5, email was not sent and the server threw the following error:
Undefined property: Swift_Transport_StreamBuffer::$_sequence
How can I resolve this issue? Thanks.

Simple solution:
In swift-mailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php change
 private $_sequence = 0;
 protected $_sequence = 0;
Then the message goes away.
I must use a different version of Swiftmailer than you in the legacy project I got the exact same error notice. My Swift::VERSION is 4.1.1.

Source of solution:

Friday, January 26, 2018

dpkg cannot find ldconfig/start-stop-daemon in the PATH variable

I have this problem in my ubuntu server 11.04,

Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: error: 2 expected programs not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)

And I found the solution from, I adjust it to my ubuntu version.

1. sudo apt-get download libc-bin    // download the library
2. sudo dpkg-deb -x libc-bin*.deb libc-bin-unpacked/              // unpack it
3. sudo cp libc-bin-unpacked/sbin/ldconfig* /sbin/    // copy to sbin folder
--- sometimes, you need to remove old one, I did it using sudo rm -rf /sbin/ldconfig*

4. sudo apt-get -f install
5. sudo dpkg-reconfigure libc-bin
6. sudo apt-get install --reinstall libc-bin

One error now is gone. Another one is solved using guide from, Below is the guide:

1. Download the dpkg package from

2. Copy the file into a temporary location:
mkdir ~/dpgk_temp
cp ~/Downloads/dpgk*.deb ~/dpkg_temp
cd ~/dpgk_temp

3. Extract the files from the archive:
ar x dpkg*.deb
tar xfvz data.tar.gz

4. Copy the file to /sbin:
sudo cp ./sbin/start-stop-daemon /sbin

5. Try update the apt information:
sudo apt-get update
sudo apt-get upgrade

Thank you to those who gives us solution, I just put this in here as my reference.

Tuesday, October 26, 2010

Resetting Password on MacOS

One of my friend called me and asked how could he reset the password on his macbook. quick browsing on google, found these interestings:


Not testing yet, but should be working since one of it is directly from Apple.