» Publishers, Monetize your RSS feeds with FeedShow: More infos (Show/Hide Ads)
I’ve been tinkering around with Python on the N900 and this one one phone hackers will love. You can make the phone do almost anything you want if you know a little bit of scripting. I picked up a bit of python to try making a call blocker which was missing for the N900, and this is what I came up with. You can read how to do that with Python in the article I wrote on MyNokiaWorld – Block Unwanted calls on your N900. You can even configure the Notification lights on the Phone by editing a configuration file.
Now how about a script which detects if the phone is in your pocket and automatically turn on the vibrate mode? I found someone who wrote up a Python script which does this for the N900 here – http://talk.maemo.org/showthread.php?t=44484
I’ve just begun exploring this phone in my free time, but it’s a great phone if you’re looking for a customizable phone and you do know Python or some Linux programming.
Here’s another article from our Guest Blogger Dr. Abhishek Puri on Opera. You can read his previous article here and here
Open Office has gone through various incarnations being heavily promoted by Sun. The best part is that it is a free open source software and be ported across different platforms. But that’s where the “good things” end.
Ever since I have shifted to Ubuntu, Open Office has remained static in it’s appearance; I am counting over 6 years of “free open source software use”. The ideological underpinnings not to use closed source software ever has not yet blinded me to the eye candy and the functionality of other systems. This is not a gripe session but Open Office is found wanting in it’s approach. It’s good thing to be standards compliant, it’s good to have cross platform availability but it sucks to have a jaded look because one doesn’t really have a choice. Indeed a paradoxical situation.
Downloading and installing to use K office is a pain because they have implemented the product in a manner which throws out user friendliness out of the window. I am not a KDE fanboy but clearly having few default “settings” that works also makes sense most of the times. It feels buggy and bloated and clearly not in the best of the “open source implementation”.
Contrast to this is perhaps the only product from Microsoft that works to some extent is their Office platform. It has been criticized ad nauseum because of the “additional options” it provides but it works and is a huge money spinner for the company. Another notable mention is Apple’s Keynote software that consistently gets scored high on usability, themes and transitions.
Why is that the developers from Open Office have not been able to innovate? In retrospect, it seems as if they are trying hard to emulate the previous versions of the closed source systems and bring out a functional product. Truth be told. Open Office is definitely a vast improvement over the previous versions. I use Impress heavily and I can testify clearly that ability to add tables and images has vastly improved over the previous versions. Animations and slide transitions are more or less static in their development but they deliver the goods specially when over the top eye candy is not required.
The difference in the approach is for other software. I had the opportunity to see Keynote in action recently and was totally wowed by the implementation. It is not even surprising that Google spews out thousands of results to turn the computer into a Mac lookalike. The usability is definitely a concern but Apple does provide a fresh perspective to it’s operating system and it’s various tightly integrated components. Ubuntu is inching closer but yet too far off for practical purposes.
This is not to say that anything free cannot compare to closed source alternatives. The debate usually centres on individual perspectives. It is all about choice. Yet, I do feel let down because my Ubuntu Box cannot match the best in the world for Office Applications.
It is no wonder that Ubuntu wanted to let go of Open Office for it’s netbook edition. It is bloated, eats up huge amounts of memory and would definitely be a pain for underpowered processors. They wanted to settle in for Google Docs with Gears implemented; it would have been a huge commercial spin off for them too. The idea is to implement Open Office as a lean mean application with eye candy and extensibility.
Interestingly, on their ideas implementation Wiki, Open Office does aim to “ape” Apple’s keynote. Unfortunately, there is no “out of the box” idea to justify this.
I am typing this out on Google Docs because it would let me email this presentation in couple of clicks. All the more practical approach. I can also collaborate with others to edit it and it works for me if I don’t demand anything extra from it. Very soon Google would be streaming advertisements too. It keeps a back up of all my past write ups although this is unhealthy reliance on cloud computing.
As I had mentioned, this is not a gripe session but an earnest need to improve upon open office beyond it’s jaded interface. This would bring in more “respectability” as well as more users, in my opinion. Ultimately it’s about increasing the user base and claiming 100 million users on the website is not going to help. Most of them, on any given day, would still want to use addictive eye candy.
Here’s another article from our Guest Blogger Dr. Abhishek Puri on Opera. You can read his previous article here.
Shifting to Linux is fraught with taking a decision in the unknown many a times. This was my feeling when I first pestered with a barrage of questions on the forums as a “n00b”.
We are so much used to the proprietary systems that it seems the “open source alternatives” may not be able to “stand up to them”. For example, the open source alternative to MS office is Open Office (including a suite of other programmes but then it is all about choice). For an average user, the predefined set task flows are good enough. Yet, there is an inherent resistance to change because the open source options don’t always feel “like” the way “standard” option does.
Hence it makes sense to stick on to products with options for cross platform approach. I have been using Opera as my standard desktop browser, which may sound antithesis to my said approach towards Open Source as a whole. The very fact that Opera has a commitment towards “Open Standards” and to “free up the web” from the evil eye of “Explorer” is a motivation enough to stick on to this browser.
Opera has had a solid reputation for innovation. They came up with tabbed browsing way before anyone even thought of that. Firefox as a “spin off” from the doomed Mozilla product is in many ways an “open source clone” of Opera. It has sought to “generate” a whole ecosystem of “extensions” with a very buggy approach towards it’s browser as a whole. The software is stunted in it’s approach and the Mozilla Foundation has neither a coherent acclaimed goal nor depth of thought process to implement it’s flagship product.
Opera has followed consistent path to dominate the browser market through mobiles and game consoles but has raised serious issues of privacy concerns. In any case, the vast majority of us nevertheless have been relying on so called “cloud computing” with no iota of debate about the same. Privacy can never be guaranteed on the Internet with variety of methodologies to hunt your browsing habits. Barring this, the product is sheer joy to use because of it’s intuitive interface and the fact that it works across the platforms. Which means that user choices are similar across the platforms and it is just a matter of synchronizing with Opera’s servers.
This isn’t about Firefox bashing but it’s competitors have a pathetic approach which makes Opera “stand out” in comparison. Coming back to where I started from. Opera has it’s native feel in Unix, BSD or even Solaris and across the “dominant platform”, Microsoft Windows.
Two notable events are worth mentioning. One is that Opera’s implementation of Widgets which can run on any platform independent of the browser; almost like an “extension library” as for other browsers like Firefox and Chrome. The other is implementation of user sharing experience of Unite. This is brilliant because it allows for a simple file transfer protocol to be implemented from the browser; while not in the strictest sense of the term but nevertheless, makes file sharing across the various connected systems a breeze.
Firefox has a lot of catching up to do; it uses up a lot of memory footprint, eats up bandwidth and is bug prone. Neither it has a mobile version but it remains a pathetic implementation of Open Source. Worse still, it cannot even package for Unix systems; instead relies on old “tar” archival format.
Should closed source systems be allowed to be ported on open source systems? This is indeed a matter of debate but then again it all boils down to personal perspective and user choice. The whys and hows are best left to be answered according to one’s approach to the solution.
I did have an issue with Opera’s 10.10 default installation in Ubuntu. It used to randomly freeze my “X” screen. This was a documented bug mentioned on the forums but there was no quick work around. Opera is implementing the new version of it’s Carakan based browser very soon and has significant amount of resources devoted to the same. They must beat the Mach deadline before MS starts shipping with it’s service packs and allows for a browser choice. For obvious reasons, Opera wants to have a stable release of it’s justified claims of the “fastest browser”.
Any alternative to Opera like Chrome is less than perfect solution. I have had to add extensions downloaded from Chrome website to make it functional as I was used on Opera. It’s ad blocking and handling of RSS feeds sucks majorly and I truly miss the in built mail client and RSS reader with occasional IRC chats as all in one solution.
The newer beta for Windows is truly a revelation. I still have to get used to something better than this. The page loads up in a jiffy and handling of resource intensive web sites is simply amazing. Opera’s engineers have worked truly hard to make an astounding product and justify the tag of the world’s fastest browser.
It would take some time before Opera 10.5 is available for other platforms; nevertheless, the wait is truly justified.
The debate between closed and open source can never have a clear winner. But everything is finally dependent on the freedom of choice and it is imperative that we become aware of such a choice too.
This article is written by a friend of mine, Dr. Abhishek Puri. He’s a doctor who’s a technology freak on the side. He dabbles around with Open Source software and is a strong advocate for the Open Source community. Here is his experience with setting up Ubuntu 9.10 on his latest laptop.
My trusty Lenovo laptop died on me as it had issues with it’s power supply. I had no other option but to sell off my three year old celeron powered workhorse which had served me rather well. However, the search for a new one proved to be more difficult than I had anticipated.
My search had been on for a system that would work on Linux flawlessly. For the past few years, I have come to love the reliability and the stability of Ubuntu and with it’s more frequent updates which give me the “best” in the desktop appearance. With an anemic RAM in the previous version, I could ill afford to run multiple applications, turn on anti aliasing of Open Office or even risk the opening up of multiple tabs while running Opera. At risk of a system freeze, it was still a workable and a usable laptop. The present day era is of 64 bit processors and it’s hard to justify their routine use for a casual user. Nevertheless, it has never been the user’s prerogative to choose.
A search in most of the electronic showrooms was quite disappointing. Most of the laptops on display were infested and infected by bloated crapware called as Windows. With jacked up prices for fancy video cards, it drove me away as I had a limited budget. I went running to my old trusty vendor who showed me a nearly perfect laptop for my needs with preloaded DoS. More than that, it had a great combination of a motherboard, an Intel chipset and integrated Wifi.
The Live USB version of Ubuntu worked great and after a quick lspci command in the terminal, I put down my hard earned money for a Compaq system.
The first thing was to format the hard drive, load up Ubuntu, apply the updates and viola a nearly perfect system was ready to use. After the mandatory load in of plug ins to ensure playback of restricted formats, it was all set up.
The only major issue surprisingly was with Opera 10.10. It used to crash the X randomly with the screen freezing up and an unresponsive keyboard. In any case, there was no solution from the forums except that I could try out Qt4 version. I decided to chuck it in favor of waiting for Opera 10.5 which promises to be a fab release due out for Unix in couple of months. I was indeed sore that the Windows version would be released first as they have huge amount of resources dedicated. This is because, Microsoft has been forced to give an option to consumers regarding the choice of browsers and Opera had been behind this landmark anti trust case. It only goes on to prove that Unix platform does offer a choice; but Opera has “cold shouldered” the Unix community as a whole since any reported bugs get scaled down on a lower priority till the new version comes out in the beta or the final release.
There is a plethora of browsers to choose from in Unix; yet I settled down on very remarkable and wonderful Google Chrome. It’s one of the most exciting software to have been released in recent times and although it doesn’t have the functionality as Opera in it’s default form, there are numerous extensions available for the same. Frankly, I have never been too happy about the extensions per se because I feel that the browser ought to have the key features built in. In any case, it all boils down to a personal choice though. For my mail and RSS feeds, I found that Evolution is a good alternative to Opera’s both inbuilt mail as well as RSS reader although the format has not really changed in the past few years. Yet, it works the works and I do miss Opera.
The icing on the cake is perhaps oodles of RAM being able to support Compiz Fusion and it’s brilliant and awesome effects. It’s sheer eye candy customisable to the nth detail and a great execution of details. Full kudos to the developers who have developed various plug ins; my favorite is the “burn” effect which burns down the window when you close it. You Tube is full of videos on this and it is indeed a school boy’s fantasy come true to own such a thing. Day in day out, I am fascinated by various effects and Mac Os looks pale in comparison in many respects.
It would not be feasible to run a full scale comparison with other platforms; this write up only details my purchase, the customization, the software and of course, the choices made. Your own experience may vary or some of the readers would want to defend the “latest” Windows 7. Yet, my arguments stay in place that “free” open source software can outperform the “closed” systems by a mile.
Ubuntu 9.10 is a great option; admittedly, there are tons of other distros that would have their adherents too. But then Open Source is all about the choice.
Picture Credit: Laptop picture has a Creative commons license from Otacon_85 on flickr
I’ve been using the Kindle ever since they started selling and shipping the international version. I find it a great device to carry around with all my favourite books on it. It also helps in cutting down the book shopping I usually indulge in when I’m at the airport. If you are looking at free content for you Kindle, first look around the Amazon Kindle store itself. If you set your address to USA in the Kindle Management Interface (http://kindle.amazon.com/), you’ll suddenly find a lot of titles have just turned free. Just sort by price (low to high) to see all the free content. If you set your country to the US, don’t download the books through the Wireless connection, or you’ll be charged $2 for the transfer. Just download them to your PC and transfer the files through USB.
If you’ve got lots of books in other formats, I had a lot of books in Mobipocket format which I used to read on my mobile phone, you’ve got to check out Calibre. It’s a cool software which allows you to move files in other formats like epub, mobi, doc or PDf to the Kindle. It actually transforms the file into the Kindle format and transfers it to your device. Here’s a video of Calibre in action.
I use it as my library management system, where I keep all the ebooks I buy on the web. Remember that Calibre can support only non-DRMed content, which means if you have an ebook which is tied to a device, you can’t read or process it on Calibre.
The best part is that Calibre is available on Windows, Mac and Linux. Click here for downloads.
Links:
Calibre Project Page
Here are some webinars from Zend which you may find interesting:
Webinar – PHP Development Best Practices: The Untold Story of Geekville
January 19, 2010 – 9:00 am PST – your computer via webex
Have you ever wondered how you could advance your PHP development? Have you considered using an Integrated Development Environment (IDE), an Issue Tracker or a Version Control tool, but were concerned about how complex it might be? Taking PHP development to the next level may be easier than you think. Attend this webinar, hosted by Atlassian and Zend More Information/Registration
Webinar – Troubleshooting PHP Issues: Best (and Worst) Techniques
January 28, 2010 – 8:00 am PST – your computer via webex
Understanding what’s causing your PHP application to be slow or just break is often time-consuming, and almost always frustrating. Join this information-packed webinar, delivered by a senior Zend PHP consultant, to learn what techniques PHP professionals use for pinpointing PHP issues in development, testing and production. More Information/Registration
I just came across a great tool for transcoding videos in Ubuntu. HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder, available for MacOS X, Linux and Windows. They’ve also got Ubuntu installers which make it easy to install this available in a GUI and a commandline version. Using handbrake you can convert your DVDs or most other video formats to the following outputs:
- File format: MP4 and MKV
- Video: MPEG-4, H.264, or Theora
- Audio: AAC, CoreAudio AAC (OS X Only), MP3, or Vorbis. AC-3 pass-through, DTS pass-thorugh (MKV only)
To install Handbrake you can either download the deb installer for Ubuntu from their download page. You can also add this to your apt sources so you get updates to the program automatically. To do this, type in the following into the terminal (works in Karmic)
sudo add-apt-repository ppa:handbrake-ubuntu/ppa sudo apt-get update sudo apt-get install handbrake-gtk |
For more information on Handbrake, head over to their site handbrake.fr.
via WebDevOnLinux
Here’s a free PHP Ebook from Bruce Perens’ Open Source Series. More about this book:
In this book, PHP 5’s co-creator and two leading PHP developers show you how to make the most of PHP 5’s industrial-strength enhancements in any project—no matter how large or complex. Their unique insights and realistic examples illuminate PHP 5’s new object model, powerful design patterns, improved XML Web services support, and much more. Whether you’re creating web applications, extensions, packages, or shell scripts—or migrating PHP 4 code—here are high-powered solutions you won’t find anywhere else.
Review PHP’s syntax and master its object-oriented capabilities—from properties and methods to polymorphism, interfaces, and reflection
- Master the four most important design patterns for PHP development
- Write powerful web applications: handle input, cookies, session extension, and more
- Integrate with MySQL, SQLite, and other database engines
- Provide efficient error handling that’s transparent to your users
- Leverage PHP 5’s improved XML support—including parsing, XSLT conversions, and more
- Build XML-based web services with XML-RPC and SOAP
- Make the most of PEAR: work with the repository, use key packages, and create your own
- Upgrade PHP 4 code to PHP 5—compatibility issues, techniques, and practical workarounds
- Improve script performance: tips and tools for PHP optimization
- Use PHP extensions to handle files/streams, regular expressions, dates/times, and graphics
- Create original extensions and shell scripts
If you’re a software developer new to PHP, you’ll leap quickly into PHP and its new object-oriented capabilities. If you’re an experienced PHP programmer, you already recognize PHP’s convenience and simplicity. Now, discover all of its extraordinary power!
Free Ebook download: Download PHP 5 Power Programming (PDF)
If you like this book and would like to order the Print book, check out Amazon’s deals on PHP 5 Power Programming.
If you’re using Linux as your primary OS, here’s a useful too to check for broken links on your websites. gURLChecker is a simple tool to check for broken links on any website. It can work on a whole site, a single local page or a browser bookmarks file.
If you’re using Ubuntu, it’s quite easy to install this tool, just head over to your Terminal and run the following command:
sudo apt-get install gurlchecker
Once the application is installed, you should be able to access it from Menu>Internet>gurlchecker
If you’re on another version of Linux, you can build from sources. Here’s how you can build gurlchecker for other version of linux by downloading the source from their svn:
svn co svn://labs.libre-entreprise.org/svnroot/gurlchecker/branches/stable cd stable/ ./autogen.sh --prefix=/usr make su -c "make install" /usr/bin/gurlchecker
You can learn more about this software over at the project page at: gurlchecker.labs.libre-entreprise.org/
If you’re new to testing in PHP, and were wondering how to create and run automated tests, here’s an ebook which will help you get the basics right.
Practical PHP Testing is an ebook which is a compilation of articles from Giorgio Sironi’s blog on Practical PHP testing.
This book takes you though the basics of PHPUnit – how to install it and start writing simple tests using PHP Unit. Here are some of what this ebook covers:
- bonus chapter on TDD theory;
- a case study on testing a php function;
- working code samples, some of whom were originally kept on pastebin.com;
- sets of TDD exercises at the end of each chapter;
- glossary that substitutes external links to wiki and other posts, to not interrupt your reading with terms lookup.
More information and download link is available here.
Ever since the upgrade to Wordpress 2.9, I’ve been having a problem in the scheduled posts in Wordpress. Everytime I set a post to be scheduled in the future, it used to miss the scheduled time and never get posted. When I checked the status of these posts in the posts admin area, each of these posts had the status “Missed Schedule” next to them.
There were some blog posts on the net asking me to get some file from the older version of Wordpress and copy it over, but I wasn’t too comfortable doing that, in case that broke anything in the new version of Wordpress. After a lot more digging I found a solution which fixed the problem using a minor edit in wp-includes/cron.php, where a timeout was set to too small an amount, causing the cron to timeout before the posts are actually published.
To fix this problem, you need to edit the cron.php file which is present in the wp-includes folder. Open the file in your favorite text editor and head over to line 229 (in Wordpress 2.9, the exact line number may change depending on your version). Look for the following line:
wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); |
Change that line to increase the timeout to 20 so the line should look like this:
wp_remote_post( $cron_url, array('timeout' => 20, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); |
Remember that you’ll have to make this change manually with each update to Wordpress till they fix this issue – it seems the same issue is present from Wordpress 2.7 onwards and triggers when the server is slow to process the cron.php file. Update: It seems it’s a bug which triggers due to a certain version of PHP’s Curl extension on the server, and will be fixed in the 2.9.1 maintenance release (via)
If you are uncomfortable going and editing this file to fix the problem, you can also try out this plugin which should work for you – Scheduled MIAs plugin.
tip via

XHProf is a heriarcical profiler for PHP originally developed by Facebook and then opensourced. The raw data collection component is implemented in C (as a PHP extension). The reporting/UI layer is all in PHP. It is capable of reporting function-level inclusive and exclusive wall times, memory usage, CPU times and number of calls for each function. Additionally, it supports ability to compare two runs (hierarchical DIFF reports), or aggregate results from multiple runs.
Here are some of the reports that XHProf provides:
- Flat profile (screenshot)
- Hierarchical profile (Parent/Child View) (screenshot)
- Diff Reports : The “flat” view (sample screenshot) & “hierarchical” (or parent/child) diff view of a function (sample screenshot).
- Callgraph View (sample screenshot)
- Memory Profile : XHProf’s memory profile mode helps track functions that allocate lots of memory.
If you are looking for an article which gives you details on how to install this extension in Ubuntu and a quick runthrough of how to use this, Lorenzo Alberton has an excellent article on this at Profiling with XHProf. There’s also a good background article on XHProf and why Facebook developed this extension over at Facebook.
Links:
XHProf Documentation
XHProf on PECL
Profiling with XHProf
Image Credit: from Crestock Photos

- Image via Wikipedia
When I talk to developers about security in web development, I usually get the answer that the security is taken care by the systems team by securing the server and by using the https protocol. In reality that is just the tip of the iceberg on security. There’s much more you should do as a developer to incorporate security into your applications.
First the myth that using https secures your website – Using the https protocol only secures the communication between the browser and the server. What if the user himself is trying to hack your application? It just secures his session and doesn’t provide security for your website or application at all.
Another assumption I’ve come across is using the form action post is more secure than get. Posted data only seems secure since the data is not visible in the url. If anyone on the network is using a packet sniffer, the post data is still visible if data is transferred through http. Here is where using https helps.
Validate your form data on the server even if you have a super cool looking javascript validation on the browser. Clever users are known to disable javascript on the browser to get around your brilliant client side validation. Which means that if javascript is gone, all your form validation on the browser goes kaput.
On the server-side you have to be strict with your inputs via $_GET and $_POST even if you receive data through the https protocol. Use a good input filter library to clean your input data. Go to the extent of typecasting the inputs to the data-type to what you expect it to be. Using raw inputs to print data on screen or write to database is asking for trouble. This is how cross-site scripting and SQL injection creep into your applications.
I’ve seen really insecure applications take a file name from a query string in the url and go ahead and print the contents on screen. It just makes life easy for the cracker by allowing him to enter the path to a system file and mine the data to get into the server. Don’t ever use public data to craft your file include logic in the code, that’s easily exploitable!
An insecure practice which I’ve noticed is programmers use remote includes into the application, to the extent of having html snippets from other sites in their application. This allows users to inject malicious code from their own servers in your application. Imagine what they can do with this kind of power. Don’t allow users to a remote include code from external server urls whether it’s innocent looking HTML or otherwise.
This is not a comprehensive article on security but a quick one to cover some common issues developers have on web application security. If you need more specifics details, let me know by commenting on this post.
Forum Nokia is launching Qt Mobility Contest, for which the grand prize is a paid trip to the upcoming Nokia Developer Summit that takes place in summer 2010 in the USA. To take part in this contest you have to create a working example of an application using QT and QT Mobility API. Don’t stop at making just one application, increase you chances of winning by submitting more, each application you submit could get you to the Nokia Developer Summit.
For more information on this contest, head over to the contest page. You have to register yourself for the contest latest by December 30, 2009.
Links:
About QT
QT Mobility Project
Qt Mobility Contest Page
Over at his blog, Abhinav Singh shows how to use the following extensions to learn more about the internal working of the Zend Engine which powers PHP:
- Tokenizer: The tokenizer functions provide an interface to the PHP tokenizer embedded in the Zend Engine. Using these functions you may write your own PHP source analyzing or modification tools without having to deal with the language specification at the lexical level.
- Parsekit: These parsekit functions allow runtime analysis of opcodes compiled from PHP scripts.
- Vulcan Logic Disassembler (vld): Provides functionality to dump the internal representation of PHP scripts.
He goes on to show how to use these extensions using a sample PHP file and PHP through command line to show what happens when you invoke a script in PHP. Head over to his article to read more.
Link: PHP tokens and opcodes : 3 useful extensions for understanding the working of Zend Engine
Igbinary is a replacement for the standard PHP serializer. While the PHP serializer uses a texual format to represent the data in the serialized version, igbinary uses a binary format which is compact. This helps in brining down the storage size of the serialized data. This helps while trying to store the data in shared memory or memcache, which uses (limited) RAM to provide faster access to data.
Since I couldn’t find any pre-built binaries, I compiled the code which I got from their site. I compiled the 1.02 build.
Here are quick steps to compile this as a PHP extension for your system ( I tried this on Ubuntu, but should work on other distros as well). Uncompress the contents of the file to a directory and head over to the directory and run the following comands one after the other. Make sure there are no errors in each stage.
>phpize >./configure CFLAGS="-O2 -g" --enable-igbinary >make >make install |
If all goes well, the file igbinary.so should be present in your default php extension directory. Once you see this file there, head over to your php.ini file and add the following line at the end of it so that the extension is loaded with PHP.
# Load igbinary extension extension=igbinary.so
Once you do this, restart your apache server to reload the PHP configurations. When you run phpinfo(), you should see the following lines in the output:

Once you’ve got that in your output, all you need to do is to substitute serialize with igbinary_serialize and unserialize with igbinary_unserialize in your code.
To see the differences in the two formats and see if the serialized and the subsequent unserialize I use the following script with some dummy data to print out the size of the output string of serialize and igbinary_serialize.
$arrc[3]=1; $arrc[2]=2; $arrc[0]=3; $arrc[1][]="Testing"; $arrc[1][]="another data"; $arrc[1][]="structure"; $arrc[]=1; $arrc[]=2; $arrc[]=3; $a = serialize($arrc); echo "<br />size of Serialize :". strlen($a); $b = igbinary_serialize($arrc); echo "<br />size of igbinary :". strlen($b); |
The output of this script came up showing that output from igbinary_unserialize does indeed use less space than the the output of serialize. Here’s the output of this script when I ran it:
size of Serialize :126 size of igbinary :74
If you want the igbinary functions to auto replace the default serialize in the PHP session handler, all you need to do is to add the following lines in your php.ini
# Use igbinary as session serializer session.serialize_handler=igbinary
If you have any experience in using this extension on your projects, let us know your thoughts and observations. You can get more information on igbinary from the author’s site at: http://opensource.dynamoid.com/
If you’re into mobile development, you should head out to this event, the Nokia Developer Convference ‘09. It’s gonna be held at Taj Residency in Bangalore on the 7th of December. Momo Bangalore along with Forum Nokia are having a tweetup tomorrow, so if you’re interested, join in http://twtvite.com/mm3jqk. I’m going for both, so let’s meet up if you’re coming for either of the events. Here’s more information on the conference:
Nokia has recently announced the Forum Nokia Developer Conference’09 to be held on the 7th December 2009 at the Taj Residency, Bangalore. Titled ‘Unlock Star’, the conference aims at leveraging the limitless possibilities of the mobile device to drive developer success. Mr. D Shivakumar, VP and Managing Director, Nokia India along with Ms. Purnima Kochikar, Vice President, Forum Nokia and Developer Community will deliver the opening keynotes, addressing leading software developers, network operators and content partners about Nokia business and technological development opportunities.
Registrations for the conference are now open at www.nokiadevcon.in. Aimed at bringing together attendees from across India to learn, share and explore the latest in application and content development, integration and distribution opportunities for Nokia devices and services, the forum will enable developers to utilize the potential of Nokia’s Ovi Store by ensuring easy access to publish applications and content to millions of Nokia devices. The conference will further help developers acquaint themselves with dynamic technology platforms for creating truly compelling user experiences, equipping them with new skills, new connections, and new ideas to create future technologies. The event would also have information sharing sessions by Industry, Business and Technology experts.
Developer attendees can also schedule one-on-one meetings at the Summit with Nokia technology and business experts to answer open questions. In addition, Forum Nokia’s Technology Expert would share the latest mobile technologies and platforms that promise to substantially broaden the software development and business horizons of mobile developers attending the event.
Over the last decade, Forum Nokia has been working extensively with the developer community in India, providing them all necessary support in terms of tools and distribution channels to bring them at par with the international community. Today, Forum Nokia has over 180, 000 registered developers in India and accounts for the single largest concentration of incoming web traffic onwww.forum.nokia.com from any country.
For more information and to register in advance for the Forum Nokia Developer Conference 2009, visit: www.nokiadevcon.in
About Forum Nokia
Nokia’s global developer program, Forum Nokia connects developers to tools, technical information, support, and distribution channels they can use to build and market applications around the globe. From offices in the U.S., Europe, India, China, and Singapore, Forum Nokia provides technical and business development support to developers and operators to assist them in achieving their goal of successfully launching applications and services to consumers and enterprises. More information is available at www.forum.nokia.com.
Here’s a good set of slides Dmitry Baranovskiy on the HTML5 Canvas tag from one of his presentations.
Last week I was searching the net for a program or application to move some of our .htaccess directives into Apache’s configuration files. The reason I was looking for this is to improve the performance of the site. When we have directives in the .htaccess file, the performance hit on Apache on when it serves each URL is accessed.
If you have a .htaccess file in your web folders, Apache will have to parse the directives in this file and see if there are any .htaccess files in the parent folder. All this happens before your html or php file is hit by Apache. You can read more about the overheads of .htaccess in this article. This article .htaccess vs httpd.conf by Dawid Golunski shows that he saw apache served about 6.6% less requests/second when .htaccess was used.
A quick Google search landed me on Paul Reinheimer’s blog where he’s created a php script just for this purpose. His htaccess to httpd.conf script parses all the htaccess files from the current folder and all sub-folders and creates a configuration file with the directives for you to place in your Apache’s configuration file.
Just download his script from this link, and place it in your web-root directory which you want to generate the Apache configuration file and run the following command from the command prompt:
php htaccess.php >~/site.conf |
After you run that command, you should have a file site.conf in your home folder. You can open this file to get all the directives for you to place in the Apache configuration file. Once you’ve placed this in the apache configuration file, you’ll need to restart Apache for the changes to take effect. Before you restart, make sure you remove your .htaccess file from your web folders.
When I converted a Wordpress’ .htaccess file using this script, here’s the output I got
<directory var="" www="" blog="">
<ifmodule mod_rewrite.c="">
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
</directory> |
I just put this into the apache2.conf and restarted it, removed the .htaccess from the webroot in /var/www/blog and all the rules worked as they should. As with any script, if you have more complex directives in your .htaccess, test your sites thoroughly before pushing your changes into the production server.
The only (minor) disadvantage I found with this method is that the apache server has to be restarted to make changes to your rule-sets you put in the configuration files. It seems apache just has to be reloaded and doesn’t have to be completely restarted to get the changes to the configuration to take effect (thanks Keleo for the tip). Also this conversion will not be possible if your site is running on a shared webhost where you don’t have access to the apache configuration files.
Links:
Paul Reinheimer’s Article .htaccess to httpd.conf
Paul’s htaccess.php Script
htaccess vs httpdconf – Benchmarks

We got the final dates for the Bangalore PHP user’s meet. The Meet up’s happening on the last Saturday of this month – the 31st of October. We’ve already got more than 30 PHP’ers who have RSVP’ed that they’ll be attending this meet. We may be having a few people come in from Chennai also who want to make it to the event.
If you’re interested in joining us on the 31st, head over to http://www.meetup.com/Bangalore-PHP-Users/calendar/11578824/, signup and RSVP ‘yes’ to the event.
We have a proposed list of talks over at this page. If you’re interested in giving a talk at the event, let me know or simply add it to that list. We’ll finalize the talks as we get closer to the event. Remember that the PHP meetups are not just about the talks, it’ll be a great place for you to meet others in the same field of work. Get to know how others are using PHP and related technologies and discuss issues you’re facing with others how may be able to help.
This month, Microsoft has providing us the venue for us to meet, and so we’re meeting at their office which is just off the Intermediate Ring Road. Hope you see you at this month’s meet.
Links:
Bangalore PHP Users Oct Meetup Calendar
Proposed list of talks for the event









![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_b.png?x-id=ef462f88-56b0-4623-a6dd-af1afe7e78d4)

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_b.png?x-id=5c8361cb-8810-4140-ab08-ab4cfb7ae956)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_b.png?x-id=0f442a59-d606-4379-aea1-8276c44df022)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_b.png?x-id=b6cac655-0975-4e40-bf3a-b5d96bd3bd2f)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=ed061bbe-dd0c-4417-b397-2e0af2360c8a)

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=2be2fa9b-ee56-4c29-85f2-ce0954e60560)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=6eacdd6d-403f-49c4-924c-d283fe581e5e)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=42360e68-d599-439d-8207-cd5ab19917a4)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=3c2c9d56-0abf-462a-bd62-e41f25e8d47c)

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=3f05f03d-69f9-41e2-af4f-bd4e21b4c515)