Skip to Main Content
PHP in a Nutshell
book

PHP in a Nutshell

by Paul Hudson
October 2005
Intermediate to advanced content levelIntermediate to advanced
372 pages
11h 35m
English
O'Reilly Media, Inc.
Content preview from PHP in a Nutshell

Chapter 2. Installing PHP

Even if you intend to use a remote web server for your site, where PHP is already installed, it is still beneficial to be able to install PHP on your own machine so that you can test your pages more easily.

Installing PHP yourself opens up many possibilities: you get to choose exactly which extensions are available, which options are enabled, and the filesystem layout that you want. Of course, if you intend to upload your scripts to a different server at the end of the process, you should be careful to mimic the remote configuration on your local machine.

This chapter goes through a full install of PHP on Windows and Unix, installing extensions, and also configuring settings in the php.ini configuration file.

Installing on Windows

For installation on Windows, you need to download the Windows binary zip package from http://www.php.net/downloads.php. This contains the main PHP executables and DLLs, plus many extensions pre-compiled and ready to use.

When you extract the zip file, it should create a folder similar in name to php-5.0.4-Win32. I suggest you rename it to "php" and move it to the root of your hard drive, giving c:\php.

Browse to the new c:\php directory, and you'll see a number of files. Copy the php5ts.dll file into your c:\windows\system32 directory (note: this may be c:\winnt on some versions of Windows), then copy the php.ini-recommended file into your c:\windows directory, renaming it to php.ini. This is the file where you will be setting all ...

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.
Start your free trial

You might also like

PHP Cookbook

PHP Cookbook

Eric A. Mann
Programming PHP

Programming PHP

Rasmus Lerdorf, Kevin Tatroe
Learning PHP

Learning PHP

David Sklar

Publisher Resources

ISBN: 0596100671Errata Page