Skip to Content
PHP Hacks
book

PHP Hacks

by Jack D. Herrington
December 2005
Intermediate to advanced
468 pages
9h 12m
English
O'Reilly Media, Inc.
Content preview from PHP Hacks

Chapter 1. Installation and Basics

Hacks 1–2: Introduction

Before you start hacking PHP, you have to either install PHP or get an account on a machine that has PHP already installed. This chapter covers the basics of installing PHP, as well as installing the critical second component, the MySQL database engine, that is so commonly used to provide data that drives PHP applications. The chapter also covers installing PEAR open source modules, which you can use for free in your own PHP applications.

Install PHP

Install the PHP language on Windows, Mac OS X, and Linux, and for both Apache and Internet Information Server.

Installing PHP is the first step in using this book, and on most operating systems, it’s a very easy thing to do. PHP installation starts with going to the PHP web site (http://www.php.net/) and downloading either the source code or the binaries, along with documentation.

Installing PHP on Windows

On Windows, you need to start your PHP installation by downloading the PHP binaries for PHP Version 5. Use the .msi installer to make it easy on yourself, and specify the installation directory as c:\php5. With your PHP installation in place, you can run the PHP interpreter from a Windows DOS prompt:

	C:\>php -v
	PHP 5.0.4 (cli) (built: Mar 31 2005 02:45:00)
	Copyright © 1997-2004 The PHP Group
	Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

If the php executable is not found, you need to add c:\php5\bin to your path. Use the Advanced tab of the system control panel, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

PHP 5 Unleashed

PHP 5 Unleashed

John Coggeshall
PHP Master

PHP Master

Davey Shafik, Lorna Mitchell, Matthew Turland
Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala

Publisher Resources

ISBN: 0596101392Errata Page