The PHP environment can be installed on almost any operating system. This allows the developer the ability to easily create a development and testing environment. Complete testing can and should be completed before the code is installed in a live environment. The developer should determine the major PHP version used in the live environment and replicate this same version in the test environment.
PHP 7 includes many new tools and has removed some tools from previous versions. Therefore, it is imperative that both the live environment and the testing environment be the same. The testing environment can also be used to test minor release changes on existing code before the live environment is upgraded to the new release.
Although PHP can be installed by itself, novice and less experienced programmers should use one of the many installation tools available to install PHP with Apache Server, MySQL, PhpAdmin, and other related applications. These packages greatly simplify the process and are free and open source. Installing PHP separately requires a more in-depth knowledge of what versions of tools are compatible and changes required to the configuration files to link these tools together.
Apache, which is open source and free, is the most common server to use with PHP. However, PHP can be used with other servers, including Microsoft’s Web Server. It is beyond the scope of this book to look at other servers. However, you can find installation information on the Internet.
MySQL, which is also open source and free, is the most common database used with PHP. PHP has the ability to use other databases, including Oracle and SQL Server among others. In many cases, the coding used to manipulate MySQL databases is very similar to the code used to manipulate other databases. php. net includes some basic information on drivers and coding for non-MySQL databases. You can also find additional information on the database’s websites. PhpAdmin is a free tool to easily create and update MySQL database information. As stated before, most packages include a version of this software.
LAMP (Linux, Apache, MySQL, PHP), MAMP (Mac, Apache, MySQL, PHP), and WAMP (Windows, Apache, MySQL, PHP) package versions are readily available on the web. There are many organizations that currently create similar packages. We will briefly look at one of them. However, you will find that they all work in a similar way.