How to fix “Headers already sent” error in PHP


The long term answer is that all output from your PHP scripts should be buffered in variables. This includes headers and body output. Then at the end of your scripts do any output you need.

The very quick fix for your problem will be to add

as the very first thing in your script if you only need it in this one script. If you need it in all your scripts add it as the very first thing in your header.php file.

This turns on PHP’s output buffering feature. In PHP when you output something (do an echo or print) if has to send the HTTP headers at that time. If you turn on output buffering you can output in the script but PHP doesn’t have to send the headers until the buffer is flushed. If you turn it on and don’t turn it off PHP will automatically flush everything in the buffer after the script finishes running. There really is no harm in just turning it on in almost all cases and could give you a small performance increase under some configurations.

If you have access to change your php.ini configuration file you can find and change or add the following

This will turn output buffering out without the need to call ob_start().

To find out more about output buffering check out

Continue reading How to fix “Headers already sent” error in PHP


How to Install Laravel 5 and Laravel 4(Windows + Wamp)


Installing Procedures of Laravel Version 5 and Version 4 on WAMP :

1. Enable OpenSSL

OpenSSL must be enabled in the PHP configuration.

Edit php.ini in your WAMP’s PHP folder, e.g.:

Note: This is not the php.ini in C:\wamp\bin\apache\Apache2.4.4\bin.

Find the following line and remove the semicolon save it:

;extension=php_openssl.dll changed to extension=php_openssl.dll

2. Install Composer

(i).Download the Composer Windows installer from

(ii). Run the installer.

(iii). When it asks for the location of php.exe, point it to the executable in your WAMP’s PHP folder, e.g.:

(iv). Finish the installation.

(v). Open a command-line interface (cmd) and type:

It should return a list of options. If you get an error, restart your computer and try again.

Composer has now been installed and added to your PATH environment variable. This means you can run it from any directory using the command-line interface.

Now we need to install Composer. This is a dependency manager that will download the latest release of Laravel and specific versions of Laravel’s dependencies, such as Doctrine and Symfony.

3.Install Laravel

Now that Composer has been installed, Composer can download and install Laravel onto your system.

(i). Open a command-line interface (cmd).

Continue reading How to Install Laravel 5 and Laravel 4(Windows + Wamp)



github-1Laravel-4.2-with-Auth-Crud is a learning module which have authentication (log in and log out) and Complete CRUD(Create,Read,Update and Delete) example.

github Link :


Laravel-4.2-with-Auth-Crud is a learning module which have authenticaton (log in and log out) and Complete CRUD(Create,Read,Update and Delete) example.

Prpcedures to use

Step 1: Get the code

Option 1: Git Clone : $ git clone

Option 2: Download the repository :

Step 2: Configure Database

Option 1: Configure the following file app/config/database.php

Step 3: Load the database from db folder.


The Laravel framework is open-sourced software licensed under the MIT license



Laravel-4.2 with Bootstrap is a package which can be used as a starter point.

github Link :


It will make easier for developer who want to use Bootstrap as their front end tool. It is a package of Laravel-4.2-with-Bootstrap-3.3.1.



1. Install Composer

Laravel utilizes Composer to manage its dependencies. First, download a copy of the composer.phar. Once you have the PHAR archive, you can either keep it in your local project directory or move to usr/local/bin to use it globally on your system. On Windows, you can use the Composer Windows installer.

Continue reading Laravel-4.2-with-Bootstrap