Testing Your Installation

To finish up the appendix, I’ll create two quick PHP scripts for the sake of testing the installations. 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.

To test PHP:

1.
Create the following PHP document in a text editor (Script A.1).
<?php
phpinfo();
?>
The phpinfo() function returns the configuration information for a PHP installation in a table. It’s the perfect tool to test that PHP is working properly.
2.
Save the file as phpinfo.php, upload to your server, and test in your Web browser (Figure A.29).
Figure A.29. The information ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide 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.