3/8/13

Installation Configuration of PHP

Once PHP has been installed on your computer, you can customize it to fit your needs. Although some
of the configuration settings deal with how the information is shown through the browser, a great many
of the settings relate to how the server handles errors and how those errors are displayed to you and
your users. You will also be able to have some control over how PHP interacts with MySQL.

Testing Your Installation:

To ensure that both PHP and Apache have been installed together, write another test program. Open
Notepad and type the following program:


PHP Testing

echo “If this works, we really did it!”;
?>
Save this file as phptest.php. Open your browser and type http://localhost/phptest.phpand you
should see the screen shown in Fig=1

Customizing Your Installation:

The configuration file that holds the key to how PHP runs on your computer is named php.ini; it can
be found in the root directory where you extracted your installation files. For the purposes of our discus-sion, we assume that you extracted the files to c:\ and then renamed the installation directory to
c:\php\.
The php.inifile includes a brief explanation of each of the configuration settings, which are beyond the
scope of this discussion. However, you are encouraged to read through the entire introduction of the
php.inifile before you begin making changes. In the table that follows, we touch on some of the more
commonly changed settings.

Money making link.

PHP5: The Future of PHP

At the time of this writing, PHP5, the newest version of PHP, is in the beta-testing phase. While we can’t
speculate on which changes, if any, will be made to the final release, we would be negligent if we did not
prepare you for some changes that will most likely be in store for those who choose to upgrade. Knowledge
of these changes is especially important for those of you who have your Web sites hosted by a third-party
hosting company; if that company decides to upgrade, you will be along for the ride. Like it or not, their
decisions ultimately affect how you code your programs.

Throughout this book, we draw attention to concepts or syntax that will change in PHP5. This informa-tion is for your benefit only and does not affect the PHP version most commonly used today, the one dis-cussed in this book.

A Brief Overview of PHP5:

With the development of PHP5, Zend brings some new methodologies to the PHP table. The biggest
change to note is the switch in focus from procedural programming to OOP (object oriented program-ming). While procedural programming has served PHP well thus far, large and complex programs are
much better served with OOP. Currently, PHP4 passes variables by value instead of reference. PHP5
changes all that. The new PHP5 provides for improved error handling and integration of objects from
external sources, such as Java.

PHP5 will change the way you do some things, and although it’s still in beta testing at the time of this
writing, we have tried to isolate specific code and circumstances that are most likely to need alteration if
and when you upgrade to PHP5. In each chapter that covers a topic that may be affected should the
upgrade take place, we will bring this information to your attention.

Installation Configuration of Apache:

For the purposes of working through this book, we assume that you have installed Apache on your com-puter. If you haven’t done so but would like to, you can find detailed installation instructions in
Appendix I.
Before you begin configuring and customizing your installation, take a minute to make sure you have
installed everything correctly.

More.... Ways To Make Money Online   // EARN $50 - $100 USD Daily Easy From Us.