preload preload preload preload

URL Redirecting (301,302) in Varnish

There is no straight forward method for 301/302 URL redirection as we did with rewrite rule. But there are some situations where we need to redirect a URL on a host to some URL on different host. In this situation we need to use 301/302 redirection.  There are two ways we can implement this. First method is to use  set req.http.host ...
0

How to Log or mail Errors in PHP Code

There are a number of things that can go wrong in code and they bound to through errors, even if you've tested them hundreds of times. PHP provides some error handling methods such as error_reporting(), set_error_handler(), error_log(), restore_error_handler() for handling errors in the PHP code. error_reporting - Sets which PHP errors ...
0

Installing Symfony Framework in Ubuntu

Install these packages with apt: php5 php5-cli php5-dev php5-sqlite php-pear $ sudo apt-get install php5 php5-cli php5-dev php5-sqlite php-pear Test if Apache and PHP are up and running typing in the browser: http://localhost/ You should see something like: Apache/2.0.55 (Ubuntu) PHP/5.1.2-1ubuntu1 Server at localhost ...
1

How to setup Memcached server

Introduction Memcached is a high-performance, distributed caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in memory to reduce the number of times the database must be read. Installing memcached shahid@shahid-laptop:~$ sudo apt-get install memcached shahid@shahid-laptop:~$ ...
1

Background Process or a Deamon Process using PHP

Process Control Functions (PCNTL) Introduction Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. Process Control should not be enabled within a web server environment and unexpected results may happen if any Process Control functions are ...
0

Google Maps API

What is the Google Maps API? The Google Maps API lets you embed Google Maps in your own web pages with JavaScript. The API provides a number of utilities for manipulating maps (just like on the shahidz.com/map.php web page) and adding content to the map through a variety of services, allowing you to create robust maps applications on your website. For enabling Google Map in your site you need a key. You can generate the key from this link : ...
2

Favicon icon in the address bar

To show icon on the address bar use html tag Syntax <link rel="shortcut icon" href="URL" type="image/ico" /> Example <html> <title> Icon in address bar </title> <link rel="shortcut icon" href="image/favicon.ico" type="image/ico" /> </html> ...
1

Installing PHP and PHP modules in Linux

In Redhat and Fedora you can use the command 'yum' yum -y install php yum -y install php-devel yum -y install php-gd yum -y install php-imap yum -y install php-ldap yum -y install php-mysql yum -y install php-odbc yum -y install php-pear yum -y install php-xml yum -y install php-xmlrpc yum -y install curl yum -y install ...
1