Posts Tagged ‘PHP’

PHP unserialize(): Error at offset – Error Solution

June 2, 2011 1 comment

Some time when we unserialize a variable in PHP, an error come out like

unserialize(): Error at offset

The reason of this error is corruption in “, ‘, :, & ; characters.

Quick Solution

the solution is 2 step based.

  1. While serializing the variable encode it with base64 encoding.


  2. While unserializing the variable decode the serialized variable using base64 encoding.



Use PEAR MDB2 In Codeigniter

December 31, 2009 Leave a comment

I use codeigniter frequently for my project, but what i always need to do is use Pear MDB2 insist of codeigniter ADR, so below is some simple step by which you can use PEAR MDB2 in your codeigniter framework.

Step 1 : Install Pear and add pear folder in your php.ini files include option.

Step 2 : if you already added the database in your autoload.php file for autoloading of your database so pls remove it.

Step 3 : Create one directory named ‘pear’ in application folder. Read more…

Codeigniter Arabic Language Pack

December 31, 2009 4 comments

Now you can use Arabic language in your codeigniter project, by using below language pack. use it for free, i use google language tool to create it so if you found any error or any suggestion just drop a comment in the same post.

For Codeigniter Version 1.7.2

Arabic Language Pack Version 1.0.0

Thanks and happy holiday