Dec 29, 2008

How to install and run PHP 5 with Apache 1.x on Windows

Step 1 : Download PHP 5 from following link
PHP 5 Download

Step 2: Download Apache 1.3.x from following link
Apache 1.3.x Download

Step 3 : Install Apache 1.3.x download by running the msi file.

Step 4: On Server Information screen enter the following information
  1. Network Domain : localhost
  2. Server Name : localhost
  3. Administrator Email Address : abc@abc.com
  4. Select for All Users, on Port 80 radio button




Step 5 : Select Typical radio button and click next to install Apache Http Server.

Step 6 : Install PHP by clicking on the php msi installer

Step 7 : Select Apache 1.3.x Module as radio button option





Step 8 : Specify the location of the PHP installation.

Basic installation is done by following steps from 1 to 8. Now Apache needs to be configured for using PHP 5.

Step 1 : Open httpd configuration file which can be found at
\\Apache Software Foundation\Apache\conf

Step 2 : Enter the following LoadModule statement after series of LoadModule statement as shown below

LoadModule php5_module "c:/php/php5apache.dll"





Step 3 : Enter the following AddType statement after series of AddType statements as shown below

AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml





Step 4 : Enter the following ScriptAlias after ScriptAlias statement as shown below
ScriptAlias /php/ "c:/PHP/"





Step 5 : Test PHP configuration

Create PHP file as follows

test.php


Place this file under \\Apache Software Foundation\Apache\htdocs directory.

Start the Apache server and place http://localhost/test.php in browser.

If screen with php info is displayed then it mean that configuration is successful else there is something wrong somewhere.

Dec 26, 2008

Book Review : Jasper Report for Java Developers

I just finished reading Jasper Report for Java Developer written by David R. Heffelfinger and published by PACKT publishing and here is my review on the book.

The book is really a good read as far as I am concerned. I had never worked on the Jasper Reports earlier, so I can say that its a very good book for beginners . If you are a java developer and want to learn working on Jasper Reports fast I would recommend this as a first book about Jasper Reports.

For those who have never worked on java I would not recommend this as the first book as it requires some basic java understanding.

The book is divided into 11 chapters.

Chapter 1 and 2 are introductory chapter describing history of Jasper Report in general and what Jasper Report is all about. It also describes the environment setup required for using Jasper Reports.

Chapter 3 is the actually where you create your first report. It also provides some of the basics of Jasper Reporting.

Chapter 4 and 5 deals with generating reports by embedding sql queries in report and using different data sources like databases, XML, Java objects etc.

Chapter 6 is an important chapter of the book as provide knowledge about maintaining report layout and design. Sub reporting details are also provided in this chapter.

Chapter 7 and 8 details out step required for adding Chart and other graphic features to the report.

Chapter 9 is totally dedicated to export formats that are supported by Jasper Reports.

Chapter 10 describe how to create reports using IReport designer. IReport makes the designing of the report very easy and simpler. In earlier chapter whatever has been mentioned related to layout and designing of report are done by writing code in JRXML file of report, but using IReport designer its just drag and drop. Although its always good to know how its reflected at the actual jrxml file and how to create reports if designer is not available.

Chapter 11 is all about integrating of Jasper Report with other frameworks like Struts and Spring. These have been explained with simple example.

In the end I would like to recommend this book to all developers who want to learn or use Jasper Report. This book is written in easy to understand language with simple example which can be used for getting hands-on.

Book can be purchased from Packt publishing