Single Sign On (SSO) is a session/user authentication process that allows a user to access multiple domains with a single username and password. To implement such a system is not easy as we all know that we can not share session information across different domains because of security restrictions. In PHP fortunately there is a very good and simple implementation of sharing session information across multiple domain
| read more
High-traffic sites can often benefit from caching of pages, to save processing of the same data over and over again. There are various ways of implementing a cache, the easiest to implement is to use Output buffer (basically if you call ob_start() at the start of your program, it suppresses all output until you specifically flush the output buffer, therefore you can easily get the output of any PHP script, write it to a static (html) file and serve this static file to all upcoming requests for a specified amount of time).
Output buffer works very well for pages which do not change very frequently, but suppose on your website you have to show logged in user's name (somewhere in website header), everything else will be same for all users. In this situation you cannot use Output buffer because you have to check dynamically weather a user is logged in or not. So how do we use cache in this situation? Answer is "Donut caching".
| read more
Default PHP version on CentOS 5.6 is 5.1.6, in order to use any functionality avaiable above 5.1.6 (such as Nowdoc strings etc.) you must have to upgrade PHP. In the following article I will explain how easily we can upgrade PHP (to latest version) on CentOS. In this post I will use yum to upgrade PHP by using REMI (3rd party) repository.
| read more
Memcached is a general-purpose distributed memory caching system that is used to speed up dynamic database-driven websites by caching data in RAM to reduce the number of times an external data source must be read. Memcached provide a giant hash table (which can be distributed across multiple machines), once table is full new inserts will purge old data in least recently used order.
| read more
Web applications do more read (SELECT) operations from database rather than write (INSERT/UPDATE/DELETE) operations. Usually record inserted only once and viewed millions of times, SELECT statements if not written correctly perform lookup in all table, although MySQL query optimizer analyzes all queries to check if any optimizations can be used to process the query more quickly, but it should be developers top priority to write their SELECT statements correctly and minimize the lookup operation. On heavy traffic websites even a fraction of a second matters, following should be considered for optimizing SELECT queries.
| read more
As a developer, my main focus is always on concentrating my logic while coding and avoiding any hindrances or distractions that might cause the quality of coding to degrade. That said, there are always a few quick hacks/changes that I apply to my favorite IDE's when possible, which allow me save a quick few seconds and increase productivity while I write my code. In the following text, I will be describing those changes. While most of them may be applicable to your favorite IDE out there, some are only available in specific applications. The good thing is you can always get hands on an open source IDE or editor, and apply those changes yourself to get them working for you. Let's move on to the list of things that you can also apply to your working environment to increase your productivity.
| read more
If you like working with Mac OS X and you don't have Mac hardware, no problem you can use Mac OS X on your personal PC no need to buy any additional hardware or software. First of all download all of the following prerequisites.
| read more
The concept of the NULL value is a common source of confusion among most of the developers.
The NULL value can be surprising until you get used to it. Most of the developers think that
NULL is the same thing as an empty string "" or 0 and they think that it is not possible to
insert a 0 or an empty string into a column defined as NOT NULL. But this is not the case 0 and empty string
are values, whereas NULL means "not having a value" or "a missing unknown value". Therefore
it is possible to insert a 0 or empty string into a column defined as NOT NULL, as these are
in fact NOT NULL.
| read more
Configuring your Apache server correctly and getting most out of it can make a huge difference how your website
works and impression it makes on its users. Especially on dynamic sites even fraction of a second matters.
In this article let's have a look how we can measure and improve Apache server performance.
| read more
In this post I will discuss how to optimize and increase performance of a website.
By following standards, implementing best practices and using few tools and techniques we can significantly improve website performance. It is almost impossible to cover all in one post so let's create a list of tips and we will discuss one by one in detail (in future posts).
| read more
As a web developer have you ever deal with a designer who is very fond of using rounded corners, drop shadows,
gradients and opacity in his/her designs and made you pull your hairs, during my 2nd job I had experience to
deal with such a designer.
Let's have a look how we can create rounded corners, gradient backgrounds, drop shadow box and opacity by
following simple CSS techniques.
| read more
- Marrying them one must have to compromise with at least one Rival (their PC or laptop).
- They can live without everything except their PC, coffee and Google search.
- If you tell them about bug in their software they will first try to convince you that it's a feature.
- They don't like formal dressing. You will find them wearing jeans and t-shirt most of the time.
- They hate working on Saturdays.
| read more