Testing Your Installation

Now that you’ve installed everything and created the necessary MySQL users, you should test the installation. I’ll create two quick PHP scripts for this purpose. In all likelihood, if an error occurred during one of the processes, you would already know it by now, but these steps will allow you to perform tests on your (or any other server) before getting into complicated PHP programming.

The first script being run is phpinfo.php. It both tests if PHP is enabled and shows a ton of information about the PHP installation. As simple as this script is, it is one of the most important scripts PHP developers ever write because it provides so much valuable knowledge.

The second script will serve two purposes. It will first ...

Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.